How to publish a module written in ES6 to NPM?

The pattern I have seen so far is to keep the es6 files in a src directory and build your stuff in npm’s prepublish to the lib directory.

You will need an .npmignore file, similar to .gitignore but ignoring src instead of lib.

Leave a Comment