-
Notifications
You must be signed in to change notification settings - Fork 587
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
Compatibility with Webpack 5 #1503
Conversation
On my Next.js project I am migrating to webpack 5. I get the following error that on my side is not possible to fix: ``Should not import the named export 'name' (imported as 'name') from default-exporting module (only default export is available soon)`` In the documentation page from webpack "To v5 from v4" the following is mentioned: ``Using named exports from JSON modules: this is not supported by the new specification and you will get a warning. Instead of import { version } from './package.json' use import package from './package.json'; const { version } = package;`` This should fix the error not just for me but also for others who are attempting: vercel/next.js#13341 (comment)
Created an issue at #1504, as it's a warning and not an error when bundling JS SDK v3 |
fix for error TS1214: Identifier expected. 'package' is a reserved word in strict mode.
Fix for error TS1259: Module can only be default-imported using the 'esModuleInterop' flag
Codecov Report
@@ Coverage Diff @@
## master #1503 +/- ##
==========================================
- Coverage 79.80% 79.77% -0.04%
==========================================
Files 298 299 +1
Lines 11502 11805 +303
Branches 2475 2483 +8
==========================================
+ Hits 9179 9417 +238
- Misses 2323 2388 +65
Continue to review full report at Codecov.
|
Super-ceded by #1505 |
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs and link to relevant comments in this thread. |
On my Next.js project I am migrating to webpack 5. I get the following error that on my side is not possible to fix:
Should not import the named export 'name' (imported as 'name') from default-exporting module (only default export is available soon)
In the documentation page from webpack "To v5 from v4" the following is mentioned:
Using named exports from JSON modules: this is not supported by the new specification and you will get a warning. Instead of import { version } from './package.json' use import package from './package.json'; const { version } = package;
This should fix the error not just for me but also for others who are attempting:
vercel/next.js#13341 (comment)