Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BUG MITIGATION: .mjs should not resolve before .js files #4085

Merged
merged 1 commit into from
Mar 22, 2018

Commits on Feb 28, 2018

  1. BUG MITIGATION: .mjs should not resolve before .js files

    Support for .mjs files added in facebook#3239 did not account for npm libraries which ship native mjs files alongside js files. This accounts for this by ensuring .js files resolve before their accompanying .mjs file. Note that this is not an ideal end state since selecting a .mjs over a .js extension should be the result of whether `import` was used instead of `require()` in a node environment with native ESM support (currently via `--experimental-modules`). Instead, this change just *always* selects a .js extension before the .mjs extension if it exists.
    
    This unbreaks support for using GraphQL (relay, apollo, etc) within create-react-app projects.
    leebyron committed Feb 28, 2018
    Configuration menu
    Copy the full SHA
    36c0b4e View commit details
    Browse the repository at this point in the history