question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Provide an ES6 build

See original GitHub issue

Status 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:closed
  • Created 4 years ago
  • Reactions:2
  • Comments:30 (17 by maintainers)

github_iconTop GitHub Comments

1reaction
bd82commented, Jul 18, 2019

Devs do not always use npm to install dependencies or want to configure a build. I think it makes a library easier to use if it is accessible over UMD or ESM bundle files. That’s the reason why I would love to see chevrotain.module.js^^.

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.

0reactions
bd82commented, Feb 27, 2021

closing this, will be tracked in: #1383

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found