Open kevinresol opened 2 years ago
When scope hoist is enabled, it breaks the app for some reason (to be investigated further)
Here are the steps to reproduce:
echo '{}' > package.json yarn add -D parcel@2.0.1 http-server yarn add @luma.gl/webgl@8.2.0 echo '<script src="index.js" type="module"></script>' > index.html echo 'import * as Luma from "@luma.gl/webgl"' > index.js echo 'console.log(Luma);' >> index.js yarn parcel build index.html yarn http-server dist & open http://127.0.0.1:8080/index.html
N/A
The example code should print out the referenced object.
Use --no-scope-hoist flag when building
--no-scope-hoist
(Edited: original post was accidentally submitted before finishing)
Reduced:
// index.js console.log(require("./globals").global); // globals.js Object.defineProperty(exports, "__esModule", { value: true }); exports.global = {foo: 'bar'};
When scope hoist is enabled, it breaks the app for some reason (to be investigated further)
🐛 bug report
Here are the steps to reproduce:
🎛 Configuration (.babelrc, package.json, cli command)
N/A
🤔 Expected Behavior
The example code should print out the referenced object.
😯 Current Behavior
💁 Possible Solution
Use
--no-scope-hoist
flag when building🔦 Context
💻 Code Sample
🌍 Your Environment
(Edited: original post was accidentally submitted before finishing)