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

Compatibility with Webpack 5 #1503

Closed
wants to merge 4 commits into from
Closed

Compatibility with Webpack 5 #1503

wants to merge 4 commits into from

Conversation

rvaronos
Copy link
Contributor

@rvaronos rvaronos commented Sep 8, 2020

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)

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)
@trivikr
Copy link
Member

trivikr commented Sep 8, 2020

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.
@trivikr trivikr self-requested a review September 8, 2020 21:53
Fix for error TS1259: Module can only be default-imported
using the 'esModuleInterop' flag
@trivikr trivikr self-requested a review September 8, 2020 22:36
@codecov-commenter
Copy link

codecov-commenter commented Sep 8, 2020

Codecov Report

Merging #1503 into master will decrease coverage by 0.03%.
The diff coverage is n/a.

Impacted file tree graph

@@            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     
Impacted Files Coverage Δ
...l_tests/aws-json/commands/EmptyOperationCommand.ts 90.00% <0.00%> (-10.00%) ⬇️
...ts/aws-query/commands/NoInputAndNoOutputCommand.ts 90.00% <0.00%> (-10.00%) ⬇️
.../aws-restxml/commands/NoInputAndNoOutputCommand.ts 90.00% <0.00%> (-10.00%) ⬇️
...aws-restjson/commands/NoInputAndNoOutputCommand.ts 90.00% <0.00%> (-10.00%) ⬇️
protocol_tests/aws-ec2/commands/XmlBlobsCommand.ts 95.00% <0.00%> (-5.00%) ⬇️
protocol_tests/aws-ec2/commands/XmlEnumsCommand.ts 95.00% <0.00%> (-5.00%) ⬇️
protocol_tests/aws-ec2/commands/XmlListsCommand.ts 95.00% <0.00%> (-5.00%) ⬇️
...rotocol_tests/aws-query/commands/XmlMapsCommand.ts 95.00% <0.00%> (-5.00%) ⬇️
...otocol_tests/aws-query/commands/XmlBlobsCommand.ts 95.00% <0.00%> (-5.00%) ⬇️
...otocol_tests/aws-query/commands/XmlEnumsCommand.ts 95.00% <0.00%> (-5.00%) ⬇️
... and 106 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update ead3816...f053f0c. Read the comment docs.

@trivikr
Copy link
Member

trivikr commented Sep 8, 2020

Super-ceded by #1505

@trivikr trivikr closed this Sep 8, 2020
@github-actions
Copy link

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.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jan 16, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants