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
If I load a chain of modules through a file: dependency, esmify throws a ParseError: 'import' and 'export' may appear only with 'sourceType: module' even when all packages declare it. Here's a repro:
/home/nweiz/goog/pkg/dart/cli_pkg/browser_library_test/build/npm/node_modules/immutable/dist/immutable.es.js:5950
export default Immutable;
^
ParseError: 'import' and 'export' may appear only with 'sourceType: module'
It looks like somehow it's loading the "module" entrypoint for immutable.js but not parsing it as a module. Note that immutable.js works fine with browserify if it's not imported from a subpackage, and that the error still appears even after editing its package.json to also contain "sourceType": "module".
Tested with Node v18.12.1, browserify 17.0.0, esmify 2.1.1, immutable 4.2.4
The text was updated successfully, but these errors were encountered:
If I load a chain of modules through a
file:
dependency, esmify throws aParseError: 'import' and 'export' may appear only with 'sourceType: module'
even when all packages declare it. Here's a repro:This produces:
It looks like somehow it's loading the "module" entrypoint for immutable.js but not parsing it as a module. Note that immutable.js works fine with browserify if it's not imported from a subpackage, and that the error still appears even after editing its
package.json
to also contain"sourceType": "module"
.Tested with Node v18.12.1, browserify 17.0.0, esmify 2.1.1, immutable 4.2.4
The text was updated successfully, but these errors were encountered: