You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Okay, first of all, it's time to come clean @guybedford: you're not a real person, are you? You're either multiple people, or some kind of Open Source project AI robot (or both?). Either way, it's time to tell the public the truth. This deception is making the rest of us look bad.
😉
With that out of the way...
When I install this project via jspm install npm:geometry.js, and then attempt to do jspm bundle-sfx, I get the following error (formatted for your viewing pleasure):
file:///<trimmed>/jspm_packages/npm/geometry.js@0.1.1/Point.js:3:1:
Unexpected reserved word export,
file:///<trimmed>/jspm_packages/npm/geometry.js@0.1.1/Point.js:3:8:
Semi-colon expected,
file:///<trimmed>/jspm_packages/npm/geometry.js@0.1.1/Point.js:3:8:
Unexpected reserved word default,
file:///<trimmed>/jspm_packages/npm/geometry.js@0.1.1/Point.js:3:16:
Semi-colon expected,
file:///<trimmed>/jspm_packages/npm/geometry.js@0.1.1/Point.js:5:17:
Unexpected token :...
This seems to be because this:
/* */"format cjs";
...gets prepended to all the source files. If I change cjs to es6, bundling works without error.
What's causing it to get interpreted as CJS?
The text was updated successfully, but these errors were encountered:
Haha, feeling rather slow this week, so glad to hear my AI is suitably deceiving :)
When installing packages from npm, we only follow the exact same rules you would get if you published a package to npm and loaded it in Node. That is we only support loading as CommonJS currently. If we set up ES6 semantics for npm, that would be creating our own convention, different to how npm may decide to implement ES6 in future.
Okay, first of all, it's time to come clean @guybedford: you're not a real person, are you? You're either multiple people, or some kind of Open Source project AI robot (or both?). Either way, it's time to tell the public the truth. This deception is making the rest of us look bad.
😉
With that out of the way...
When I install this project via
jspm install npm:geometry.js
, and then attempt to dojspm bundle-sfx
, I get the following error (formatted for your viewing pleasure):This seems to be because this:
...gets prepended to all the source files. If I change
cjs
toes6
, bundling works without error.What's causing it to get interpreted as CJS?
The text was updated successfully, but these errors were encountered: