Provide an ES6 build
See original GitHub issueStatus Update
- ESM build is provided as part of the npm package beginning from version 5.0.0
- This esm build is not bundled, providing a bundled esm build will be evaluated depending on JavaScript library development best practices and end users requests.
Original Issue by @mugen87 below:
We are using chevrotain for our new VRMLLoader
in three.js
(see https://github.com/mrdoob/three.js/pull/16726). Since we currently migrate our official examples to an ES6 module code base, it would be great if all external libraries provide a respective module file, too. In this particular case, something like chevrotain.module.js
😊
Issue Analytics
- State:
- Created 4 years ago
- Reactions:2
- Comments:30 (17 by maintainers)
Top Results From Across the Web
How to build, test and release a node module in ES6
Learn how to build, test and release a JavaScript node module in ES6 all the way from npm init to npm publish.
Read more >A Practical guide to ES6 modules - freeCodeCamp
I hope this article provides you some insight into how to deal with ES6 modules effectively when building apps, and the things that...
Read more >How to Build and Publish ES6 Modules Today, with Babel and ...
Now you can build your library by running “node tools/build” (assuming you have Node.js 6 installed on your local machine) and publish it...
Read more >Provide an ES6 module build #769 - taye/interact.js - GitHub
Wished-for behavior Having an ES6-modules compatible build so that interact.js can be cleanly used without a toolchain, too.
Read more >How to build a complete JavaScript library using ES6 and ...
Therefore we need a transpiler to convert our ES6 code to a lower version which can be supported by all browsers. Babel does...
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
I agree that is why Chevrotain is already providing a UMD build (both minified and unminified).
I think the first step would be to provide an esm + es5 + un-bundled artifact. which can be accomplished without any new tooling (by using TSC).
The second step would be to investigate farther how common it is to also provide bundled esm modules in the JavaScript eco-system and if it considered a good/best practice try to implement that as well.
I think we can run the tests for the esm bundles using
--experimental-modules
CLI argument on modern version of node.js.closing this, will be tracked in: #1383