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

.mjs should not resolve before .js files (#4085) (#4317) #4318

Merged
merged 1 commit into from
May 20, 2018

Commits on Apr 17, 2018

  1. .mjs should not resolve before .js files (facebook#4085)

    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 authored and craigmulligan committed Apr 17, 2018
    Configuration menu
    Copy the full SHA
    6ea08c4 View commit details
    Browse the repository at this point in the history