Pulled 1.9.3 with the fixes to tree-shaking. Didn't change any of our already working and building code from 1.9.2. Ran build with the --experimental-scope-hoisting flag. Now, it builds without error. However, going to the built package shows this JS error:
Uncaught ReferenceError: $409$var$Arr is not defined
at Object.Dxa [as toByteArray] (client.745ce2b5.js:1)
at N$ (client.745ce2b5.js:1)
at i$ (client.745ce2b5.js:1)
at zwa (client.745ce2b5.js:1)
at $Z (client.745ce2b5.js:1)
at g (client.745ce2b5.js:1)
at Jg (client.745ce2b5.js:1)
at client.745ce2b5.js:1
at client.745ce2b5.js:1
at client.745ce2b5.js:1
{
"presets": [
"env",
"react",
"stage-3"
],
"env": {
"test": {
"plugins": [
"rewire"
]
}
},
"plugins": [
[
"module-resolver",
{
"root": [
"./",
"./components",
"../modules",
"../node_modules"
],
"alias": {
"style": "./style"
}
}
],
"transform-class-properties"
]
}
Package builds and works with --experimental-scope-hoisting.
Does not.
| Software | Version(s) |
| ---------------- | ---------- |
| Parcel | 1.9.3
| Node | 10.4.1
| Yarn | 1.7.0
| Operating System | macOS
Could you have a look in the bundle and look for all the references to $409$var$Arr and look for anything strange?
A minimal reproduction repo would also be helpfull.
I think I've run into the same issue. Building without --experimental-scope-hoisting works, adding the flag still builds but when using the js file I get index.js:1 Uncaught ReferenceError: Preact is not defined
Here's the code https://github.com/adriaanwm/js/tree/master/packages/app
steps:
npm run build open index.prod.html in browser, doesn't worknpm run build-working open index.prod.html in browser, works@adriaanwm That issue was fixed by PR #2292.