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

ES6 modules #22

Open
nicolashenry opened this issue Feb 14, 2019 · 3 comments
Open

ES6 modules #22

nicolashenry opened this issue Feb 14, 2019 · 3 comments

Comments

@nicolashenry
Copy link
Contributor

Would you consider using ES6 modules?

Thanks :)

@bripkens
Copy link
Owner

Hey @nicolashenry,

what would be the benefit for this project/for the users?

@nicolashenry
Copy link
Contributor Author

@bripkens
The benefit would be to be able to load this library without the need of a bundler when used in the browser and in my case to take advantage from treeshaking with rollupjs.

The idea would be for example to provide an additional version of the library in the final package with the "module" property referencing it. Rollup and Webpack both understand this property, see here. You could translate the ES6 module version to commonjs with a transpiler like this one to prevent code duplication.

@bripkens
Copy link
Owner

@nicolashenry: Sounds like a fine idea. Though I have no capacity/need for this. If you need it, feel free to open up a PR :).

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

Successfully merging a pull request may close this issue.

2 participants