Skip to content
This repository has been archived by the owner on Feb 18, 2024. It is now read-only.

@neutrinojs/library - compile to standard ES5 #781

Closed
flash1293 opened this issue Apr 2, 2018 · 5 comments
Closed

@neutrinojs/library - compile to standard ES5 #781

flash1293 opened this issue Apr 2, 2018 · 5 comments

Comments

@flash1293
Copy link

flash1293 commented Apr 2, 2018

IMHO the library preset should configure babel to compile to standard ES5 to be consumable by uglify, incuding async/await and other language features.

@flash1293 flash1293 changed the title @neutrinojs/library should compile to standard ES5 @neutrinojs/library - compile to standard ES5 Apr 2, 2018
@eliperelman
Copy link
Member

I think this is reasonable, and I am thinking the same thing about react-components as well so they play well with CRA by default. The tradeoff here comes with the size expense.

@mozilla-neutrino/core-contributors thoughts?

@edmorley
Copy link
Member

Or ideally compile to both - one for the project's main and the other for module.

@eliperelman
Copy link
Member

See also #722.

@eliperelman eliperelman self-assigned this May 24, 2018
@eliperelman eliperelman added this to the v9 milestone May 24, 2018
@eliperelman
Copy link
Member

eliperelman commented May 24, 2018

one for the project's main and the other for module.

From what I've been reading, the current practice still seems to be compile to ES5 for both main and module, just that the main uses CJS and module uses ES imports.

That said, with the current master implementation you would need to run webpack twice or export an array of configs since there is no longer any fork middleware.

@edmorley
Copy link
Member

edmorley commented Jun 8, 2018

This doesn't block a Neutrino v9 alpha - however since it's a breaking change, someone would need to start working on this soon or else it's not going to make Neutrino 9 final, and would then have to wait until Neutrino 10.

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

No branches or pull requests

3 participants