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
When imported, these modules normally work, but when bundled using jspm build, the value that gets imported appears to be an empty object, rather than the value returned by getterFunction.
I discovered this via the chalk package, which imports ansi-styles, but I think with chalk the bug may only manifest on Windows, so I made the following minimal reproduction:
After cloning this repo and doing npm install and jspm install, if you run jspm run jspm-chalk-bug, it will print the correct value ("Hi"). But if you run jspm build jspm-chalk-bug --node and then node build.js, it instead prints "undefined".
This worked correctly in 0.17.0-beta.41. It's broken in beta.42 through 44.
Workaround suggestions (specifically for chalk) would be appreciated too. I don't really need its functionality (it does text styling in terminal logging), but it doesn't seem to be sufficient to map ansi-styles to @empty, because the expected properties of the imported object are still undefined. But I really don't understand jspm configuration.
The text was updated successfully, but these errors were encountered:
JSPM Version:
0.17.0-beta.44
Transpiler Plugin(s): babel
Details:
There are npm/CJS modules that set their exports like this:
An example is the ansi-styles package.
When imported, these modules normally work, but when bundled using
jspm build
, the value that gets imported appears to be an empty object, rather than the value returned bygetterFunction
.I discovered this via the chalk package, which imports
ansi-styles
, but I think withchalk
the bug may only manifest on Windows, so I made the following minimal reproduction:https://github.com/adelespinasse/jspm-chalk-bug
After cloning this repo and doing
npm install
andjspm install
, if you runjspm run jspm-chalk-bug
, it will print the correct value ("Hi"). But if you runjspm build jspm-chalk-bug --node
and thennode build.js
, it instead prints "undefined".This worked correctly in
0.17.0-beta.41
. It's broken in beta.42 through 44.Workaround suggestions (specifically for chalk) would be appreciated too. I don't really need its functionality (it does text styling in terminal logging), but it doesn't seem to be sufficient to map
ansi-styles
to@empty
, because the expected properties of the imported object are still undefined. But I really don't understand jspm configuration.The text was updated successfully, but these errors were encountered: