You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Experimental modules warning does not show when using dynamic import #30601
When using dynamic import the experimental modules implementation is effectively used "lazily". Even when loaded at this point the warning should still be displayed.
From looking at this code I suspect we cannot prevent the warning if import('./nyc.config.js') loads a CJS file? This makes me lean towards just not supporting nyc.config.js when type: 'module' is specified.
Activity
coreyfarrell commentedon Nov 22, 2019
From looking at this code I suspect we cannot prevent the warning if
import('./nyc.config.js')loads a CJS file? This makes me lean towards just not supportingnyc.config.jswhentype: 'module'is specified.juanarbol commentedon Nov 28, 2019
How can I recreate this?
I've change
esm_loader.js, hard coded warning:The warning is already emitted on another place, so it appears two times.
coreyfarrell commentedon Nov 29, 2019
@juamedgod create two files:
Then run
./node ./test.cjs. Output on current master branch: