Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Distributing ES6 #355

Open
goatslacker opened this issue May 27, 2015 · 3 comments
Open

Distributing ES6 #355

goatslacker opened this issue May 27, 2015 · 3 comments

Comments

@goatslacker
Copy link
Collaborator

section on how to publish es6 files to npm

@fredericksilva
Copy link
Contributor

Stackoverflow answer

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. José F. Romaniello

@ljharb
Copy link
Collaborator

ljharb commented Apr 20, 2016

The "main" entry point should always be ES5, and node-style commonJS. Original source files and babel settings should be included in the published packages, along with tests.

We definitely should add a section about this.

@andykenward
Copy link

Check out the issue on redux. I've seen npm packages compile babel+es6 code to es6 into a \es or\es6 folder. And refer to it in the package.json as "jsnext:main"

So it could possible be used for tree shaking with rollup or webpack2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants