Skip to content

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

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

Disabling esmExternals generates a misleading warning message #33621

Closed
nbouvrette opened this issue Jan 25, 2022 · 0 comments
Closed

Disabling esmExternals generates a misleading warning message #33621

nbouvrette opened this issue Jan 25, 2022 · 0 comments
Labels
bug Issue was opened via the bug report template. Webpack Related to Webpack with Next.js.

Comments

@nbouvrette
Copy link
Contributor

Run next info (available from version 12.0.8 and up)

Operating System:
  Platform: win32
  Arch: x64
  Version: Windows 10 Home
Binaries:
  Node: 16.13.2
  npm: 8.3.2
  Yarn: 1.22.10
  pnpm: N/A
Relevant packages:        
  next: 12.0.8
  react: 17.0.2
  react-dom: 17.0.2  

What version of Next.js are you using?

v12.0.8

What version of Node.js are you using?

16.6

What browser are you using?

Chrome

What operating system are you using?

Windows

How are you deploying your application?

Vercel

Describe the Bug

Since Next.js 11.1.3-canary.69, ESM externals has been turned on by default using the experimental: { esmExternals: true } in this commit.

Unfortunately ESM external is still not compatible with a lot of packages and the only way to turn it off is by setting the following config:

experimental: { esmExternals: false }

The problem is that any configuration set under experimental triggers the following warning logs, which for this case seems misleading:

warn  - You have enabled experimental feature(s).
warn  - Experimental features are not covered by semver, and may cause unexpected or broken application behavior. Use them at your own risk.

This is related to #33148

Expected Behavior

I would expect that esmExternals is moved from experimental to "top-level" and stops triggering the warning.

To Reproduce

Simply set experimental: { esmExternals: false } in next.config.js

@nbouvrette nbouvrette added the bug Issue was opened via the bug report template. label Jan 25, 2022
@nbouvrette nbouvrette changed the title Disabling esmExternals generated a misleading warning message Disabling esmExternals generates a misleading warning message Jan 25, 2022
@balazsorban44 balazsorban44 added the Webpack Related to Webpack with Next.js. label Jan 25, 2022
@vercel vercel locked and limited conversation to collaborators Jan 25, 2022
@balazsorban44 balazsorban44 converted this issue into discussion #33640 Jan 25, 2022

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

Labels
bug Issue was opened via the bug report template. Webpack Related to Webpack with Next.js.
Projects
None yet
Development

No branches or pull requests

2 participants