Open to an ES5 transpile build step?
See original GitHub issueIf I (or someone) can work out a way to do it would you be open to accepting a PR that has a prepublish step that transpiles the ES6 code to ES5 so that ES5 restrained consumers can also use this module?
E.g. prepublish uses babel to generate output to /lib/es5/ before publish and that’s the entry point for ES5 consumers. This would not impact the ES6 consumers and the current ES6 being used in the module. i.e. ES6 by default. ES5 needs to be explicitly required
by the consumer by path.
Might also help with #1 which might need ES5 for browsers.
Issue Analytics
- State:
- Created 7 years ago
- Reactions:2
- Comments:5 (2 by maintainers)
Top Results From Across the Web
Author In ES6, Transpile To ES5 As A Build-step - Addy Osmani
Today I used a Grunt task called grunt-traceur by Aaron Frost to author code in ES6 (maximally minimal classes, modules, rest params, spread ......
Read more >Why don't you add ES5 transpiled code to your modules for ...
One solution would be to automatically check the "engine" field in the package.json of dependencies and decide which dependencies to transpile.
Read more >Transpiling EcmaScript6 code to ES5 using Babel
Transpiling EcmaScript6 code to ES5 using Babel ... If you open the build/ListView.js file, you will see some calls to require function:.
Read more >Transpile “debug” and other npm packages to es5 - Medium
Piece of code located in webpack.config.js file. · This is a part of webpack.config.js configuration. · From now on, no more issues with ......
Read more >Transpiling ES6 to ES5 with Traceur and Babel - Blog
Open the node_modules folder and notice the subfolders that are there now. Step 4: Creating a gulpfile. Now that all of the necessary...
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
I started a branch for this task. I think the best tech for this is rollup, since we can transpile for es5 and es6 at the same time. If someone needs to target only evergreen targets, they can use es6 build (and use stuff like type=module for scripts), otherwise, use es5.
Shipping a es5 version should be fine, and is probably needed for a universal version. I am all for it atleast