Open thdoan opened 2 years ago
Reproduction:
// a.js
import { TWEEN } from "./b.js";
console.log(TWEEN);
// b.js
var TWEEN = "something";
(function (t) {
if ("undefined" != typeof module && "object" == typeof exports) {
module.exports = TWEEN; // Parcel takes this branch
} else if (t !== undefined) {
t.TWEEN = TWEEN;
}
})(this);
export { TWEEN };
But there's really not a lot we can do here because of the combination of ESM and CJS in the same file.
🐛 bug report
Parcel fails to import the ES6 version of tweenjs.
🎛 Configuration (.babelrc, package.json, cli command)
🤔 Expected Behavior
The TWEEN object should be present.
😯 Current Behavior
The TWEEN object is undefined.
💁 Possible Solution
🔦 Context
💻 Code Sample
Steps to reproduce:
npm install three
yarn parcel test.html
🌍 Your Environment