-
Notifications
You must be signed in to change notification settings - Fork 4.1k
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
Webpack 5 support. ESM strict mode #4253
Comments
Anyone still experiencing issues with this: hoisting |
@caravinci What manifest are you talking about? trying to figure out a workaround Also, hoping this gets fixed soon |
@cmonteiro128 I'm referring to this https://yarnpkg.com/configuration/manifest/#resolutions Side note, forgive me if I'm stating something you already know, but just in case someone else who doesn't stumbles upon my previous comment: "Manifest" is the technical term for the file |
@caravinci I ended up figuring out what you meant afterward, and saw it was only available in yarn. I'll give that NPM package a try though, thanks! |
@thomaswelton sorry for the lack of replies about this issue or your previous PR. If you would kindly create another PR, I can have this added as a part of the discussion for the next milestone release. |
Note that this issue shouldn't be blocking anyone because the current range for |
@Methuselah96 surprisingly this is blocking for us. We're using React-Select in a monorepo and so far have not found any way to proceed with using React-Select. I tried using package.json's "resolutions": {
"react-select/@babel/runtime": "^7.12.13"
} When we used resolutions for the whole project without scoping to Looking into possible alternate syntax now. Update: Doesn't look promising yarnpkg/yarn#4874 |
Have you tried removing all |
(Note I'm also working on getting the PR through in order to avoid the situation altogether. Hopefully we can include the fix in the next release.) |
Thanks @Methuselah96, that's a good idea; giving that a shot now. Also deleted our entire |
That worked out, and I can confirm the entries for Before:
After:
|
See: babel/babel#12058
Webpack 5 has enabled strict mode on the ESM modules imports.
As a result when using react-select in our project and compiling with Webpack 5 produces errors such as
Module not found: Error: Can't resolve './iterableToArray' in '/Users/thomaswelton/Projects/justpark-web/node_modules/react-select/node_modules/@babel/runtime/helpers/esm'nDid you mean 'iterableToArray.js'?nBREAKING CHANGE: The request './iterableToArray' failed to resolve only because it was resolved as fully specifiedn(probably because the origin is a '*.mjs' file or a '*.js' file where the package.json contains '"type": "module"').nThe extension in the request is mandatory for it to be fully specified.nAdd the extension to the request.
This has been fixed in babel 7.12.0
I will submit a PR to bump
@babel/runtime
to 7.12.0The text was updated successfully, but these errors were encountered: