-
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
Regression: parcel@2.8.0 build keeps undefined $08c370c820b39c31$exports
for ESM
#8624
Comments
I have the same issue. In my case it seems that it's D3 that is not included in the bundle. |
@niicojs Please open a new issue with a reproduction |
@mischnic yes, running the code as is does not throw. I did not include a more complex example that throws because even with the basic example, the output file contains the undefined variable. Should I also provide an example that throws an error? |
No, I did find the undefined variable in the meantime: var $641923ca85682c73$exports = {};
$parcel$export($641923ca85682c73$exports, "*", () => $cdef374e0b4cc0a5$exports); // <-----
$parcel$export($641923ca85682c73$exports, "GenericExtrinsic", () => $cdef374e0b4cc0a5$export$84cf34f56e9b2fd5);
// Copyright 2017-2022 @polkadot/types authors & contributors |
Because of parcel-bundler/parcel#8624 Can’t use 7.0.0 because of parcel-bundler/parcel#8413 Fix #734 Fix #735
Hi @mischnic, I have a similar bug with the brand new 2.8.2 (and 2.8.1 as well): now the name of the undefined variable is |
@arty-name Please open a new one. |
🐛 bug report
When I import two particular packages (one depends on another) the and run
parcel build
, the output file code uses an undefined identifier$08c370c820b39c31$exports
. Trying to actually use the code from the file results in error then.🎛 Configuration (.babelrc, package.json, cli command)
There’s no configuration beyond
"type": "module"
in package.json. I just runparcel build index.js
.🤔 Expected Behavior
When optimizing the code parcel should not remove declarations of constants that are used in the code.
😯 Current Behavior
The code includes the line
var gs={};r(gs,"*",(()=>$08c370c820b39c31$exports)),...
and$08c370c820b39c31$exports
is not defined anywhere, resulting in runtime errors during more complex usage.💁 Possible Solution
Stay on parcel@2.7.0 for now?
🔦 Context
I was trying to upgrade a project to use the latest parcel@2.8.0 and will not do this now.
💻 Code Sample
To reproduce:
git clone https://github.com/arty-name/parcel-build-fail cd parcel-build-fail yarn install yarn run build
🌍 Your Environment
The text was updated successfully, but these errors were encountered: