Skip to content
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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Regression: parcel@2.8.1 build keeps undefined $7f9d4f94f3d938e3$re_export$bool for ESM #8705

Closed
arty-name opened this issue Dec 19, 2022 · 1 comment 路 Fixed by #8738
Closed

Comments

@arty-name
Copy link
Contributor

馃悰 bug report

When I build my project using parcel build the output file includes an undefined identifier $7f9d4f94f3d938e3$re_export$bool. Trying to actually use it results in error.

This error only started appearing after #8624 was fixed.

馃帥 Configuration (.babelrc, package.json, cli command)

The parcel configuration of the project is pretty basic

  "targets": {
    "default": {
      "source": "src/index.html",
      "distDir": "build",
      "context": "browser"
    }
  },

馃 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 e(aA,"bool",(()=>$7f9d4f94f3d938e3$re_export$bool)),.. and $7f9d4f94f3d938e3$re_export$bool is not defined anywhere, resulting in runtime errors.

馃拋 Possible Solution

Stay on parcel@2.7.0 for now?

馃敠 Context

I was trying to upgrade a project to use the parcel@2.8.1 and will not do this now.

馃捇 Code Sample

The parcel update PR in my project and it鈥檚 deployed version.

馃實 Your Environment

Software Version(s)
Parcel 2.8.1
Node v18.12.1
npm/Yarn 1.22.19
Operating System Ubuntu 22.04.1
@mischnic
Copy link
Member

mischnic commented Jan 1, 2023

MInimal Reproduction:

import * as ns from "./library/b";
console.log(ns, ns.value1, ns.value2);

// library/package.json 
{ "sideEffects": false }

// library/b.js
export { value1, value2 } from './c.js';

// library/c.js
export { value1, value1 as value2 } from "./d";

// library/d.js
export const value1 = 2;

A regression caused by #8432

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants