Skip to content
This repository has been archived by the owner on Oct 4, 2022. It is now read-only.

Export to npm with a normal build and an ES6 build #1930

Closed
atimmer opened this issue Oct 30, 2018 · 1 comment
Closed

Export to npm with a normal build and an ES6 build #1930

atimmer opened this issue Oct 30, 2018 · 1 comment

Comments

@atimmer
Copy link
Contributor

atimmer commented Oct 30, 2018

What did you expect to happen?

I expect to be able to consume an ES6 project if my toolchain supports it, but I don't want to run babel on all of YoastSEO.js.

What happened instead?

I have to run babel on all of YoastSEO.js or I can't use ES6 modules.

Technical details

For an example of how this could work you could look at Gutenberg. They build to a build folder and a build-module folder. build is then specified as the main entry point in the package.json. build-module is specified as module entry point in the package.json. In both builds all other ES6 syntax is transpired down to ES5.

@omarreiss
Copy link
Contributor

Will come up again during audit.

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

No branches or pull requests

2 participants