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
Making a "minimal" #0CJS webpack@4 project that uses rollup@1.0.1 as a dependency, and trying to build it.
# Install goodies
npm install --save-dev rollup@1.0.1 webpack webpack-cli
# Set up a "main" that pulls rollup
mkdir src
echo"const rollup = require('rollup');"> src/index.js
# Invoke webpack
npx webpack-cli --target node
Expected Behavior
Webpack to succeed, without the following WARNINGs
Actual Behavior
Error output of the form:
WARNING in ./node_modules/rollup/dist/rollup.es.js 15988:0-14
"export 'default' (imported as 'acorn__default') was not found in 'acorn'
@ ./src/index.js
WARNING in ./node_modules/rollup/dist/rollup.es.js 15993:20-34
"export 'default' (imported as 'acorn__default') was not found in 'acorn'
@ ./src/index.js
WARNING in ./node_modules/rollup/dist/rollup.es.js 16018:28-42
"export 'default' (imported as 'acorn__default') was not found in 'acorn'
@ ./src/index.js
WARNING in ./node_modules/rollup/dist/rollup.es.js 16030:28-42
"export 'default' (imported as 'acorn__default') was not found in 'acorn'
@ ./src/index.js
WARNING in ./node_modules/rollup/dist/rollup.es.js 16048:11-25
"export 'default' (imported as 'acorn__default') was not found in 'acorn'
@ ./src/index.js
Investigation
Following the same steps with rollup@0.68.2 does not produce warnings.
Looking in node_modules/rollup/dist/rollup.es.js I see:
importacorn__default,{Parser}from'acorn';// ^--- grabs the default export and calls it acorn__default
Looking in node_modules/acorn/dist/acorn.mjs:
export{version,parse,parseExpressionAt,tokenizer,Parser,defaultOptions,Position,SourceLocation,getLineInfo,Node,TokenType,typesastokTypes,keywords$1askeywordTypes,TokContext,types$1astokContexts,isIdentifierChar,isIdentifierStart,Token,isNewLine,lineBreak,lineBreakG,nonASCIIwhitespace};// ^--- long list of exports, none of which are default
I've not yet attempted to trace the origin of the default import.
Workaround
I've been able to temporarily work around this using the NormalModuleReplacementPlugin to redirect ^rollup$ to the non-ESM version.
Excited to be upgrading to the v1.0.0 release, congratulations! 🎉
The text was updated successfully, but these errors were encountered:
How Do We Reproduce?
Making a "minimal" #0CJS webpack@4 project that uses rollup@1.0.1 as a dependency, and trying to build it.
Expected Behavior
Webpack to succeed, without the following
WARNING
sActual Behavior
Error output of the form:
Investigation
Following the same steps with rollup@0.68.2 does not produce warnings.
Looking in node_modules/rollup/dist/rollup.es.js I see:
Looking in node_modules/acorn/dist/acorn.mjs:
I've not yet attempted to trace the origin of the default import.
Workaround
I've been able to temporarily work around this using the NormalModuleReplacementPlugin to redirect
^rollup$
to the non-ESM version.Excited to be upgrading to the v1.0.0 release, congratulations! 🎉
The text was updated successfully, but these errors were encountered: