broken es-2015/native-js imports
See original GitHub issuehey,
between versions 1.2.0 and 1.2.1 you’ve changed the import behaviour for native javascript modules.
import cookie from "cookie_js";
the statement above imports cookie.js in the files execution context. in version 1.2.0 cookie
is now an object with the interface described in the readme. in version 1.2.1 it’s an object with a single property called cookie
. this is probably a sideeffect of this commit 4203e0090bcaf31ee202264f38616c222998551f.
this problem just sneaked into my codebase and broke one of my modules when i called npm update
, because 1.2.1 was a patch release 😉.
Issue Analytics
- State:
- Created 7 years ago
- Comments:6 (4 by maintainers)
Top Results From Across the Web
ES2015 import doesn't work (even at top-level) in Firefox
When I load the page in Firefox 46, it returns "SyntaxError: import declarations may only appear at top level of a module" -...
Read more >JavaScript modules - MDN Web Docs
This guide gives you all you need to get started with JavaScript module ... Use of native JavaScript modules is dependent on the...
Read more >Tree shaking completely broken? · Issue #2867 · webpack ...
Tree shaking is not removing imports, not used in the app. ... Tree shaking, removing not used imports. The test case is a...
Read more >Using Native JavaScript Modules in Production Today
But now, thanks to some recent advances in bundler technology, it's possible to deploy your production code as ES2015 modules—with both static ...
Read more >16. Modules
An ES6 module can pick a default export, the main exported value. Default exports are especially easy to import. The following ECMAScript 6...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
This should now be fixed in v1.3.0 as of #47, thanks to @banyan.
@florian Sorry to bother you. #47 can solve this problem so can you have a look at that?
I switched to forked version (
"cookie_js": "git+https://github.com/banyan/cookie.js#rollup"
) and it works fine.