Skip to content

DISCUSSION: react-server-build-tools and react-server-bundleNameUtil #65

@doug-wade

Description

@doug-wade

We had an interesting situation at Redfin where we accidentally introduced a build-time dependency on React via our build-time dependency on react-server. This is solvable by using relative file imports, but its an easy bug to commit -- at build time you require('react-server/core/util/bundleNameUtil'), and at runtime you require('react-server').bundleNameUtil. I'm not sure how or if we want to fix this, but one way might be to add two new packages: react-server-bundleNameUtil (which contains bundleNameUtil) and react-server-build-tools (which contains react-server-bundleNameUtil and the babel options, and more generally any of the tools that are required at build-time). You could then take a devDep on react-server-build-tools and a dependency on react-server, and have them both work as anticipated (and, if we did need a build-time dependency of React, we could bundle a copy of React and not rely on a peerDep).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions