Generate an ESM bundle
See original GitHub issueHello! Would you be open to a pull request adding an ESM bundle? This would require roughly two changes:
- add a build script
build:esm
, building the project using a slightly modifiedtsconfig.json
and outputting todist/esm
(or similar). - add a
module
field topackage.json
pointing todist/esm/index.js
.
If you are keen I am happy to PR 😃
Thanks for the library!
Issue Analytics
- State:
- Created 3 years ago
- Reactions:4
- Comments:17 (12 by maintainers)
Top Results From Across the Web
An ESM bundle for any NPM package | by Joel Denning
If the package isn't there, you can create a repository that auto-publishes an ESM and SystemJS version every time the official version ...
Read more >How to Create a Hybrid NPM Module for ESM and CommonJS.
The TypeScript or Babel transpilers will automatically bundle exports into a module.exports and then generate a ".default" reference for you ...
Read more >webpack – How To Generate an ES Module bundle
In this post I will detail how you can use webpack to output a library (bundle) file that exposes the ECMAscript module (ESM)...
Read more >Pure ESM package - Discover gists · GitHub
Bundle your dependencies with Webpack into a CommonJS bundle. Use the esm package. I'm having problems with ESM and Webpack. The problem is...
Read more >Publish ESM and CJS in a single package - Anthony Fu
unbuild is being used to bundle Nuxt 3 and it's sub packages. To use it, we create build.config.ts file in the root.
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
FWIW, it’s being worked on: https://github.com/rollup/plugins/pull/658
@mmeylan I’m having trouble reproducing the runtime issues with the ESM module you’re describing. What’s your build process? If you could throw together a reproduction repo that would be awesome. I’m trying to fix the issues with the Zod ES module over the weekend.