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

Option to use ES2015 Flat ESM format with Angular 4+ #5097

Closed
cyrilletuzi opened this issue Feb 28, 2017 · 3 comments
Closed

Option to use ES2015 Flat ESM format with Angular 4+ #5097

cyrilletuzi opened this issue Feb 28, 2017 · 3 comments

Comments

@cyrilletuzi
Copy link
Contributor

Angular 4.0.0-rc.1 changelog :

ES2015 Builds

We now also ship our packages in the ES2015 Flat ESM format. This option is experimental and opt-in (configure your webpack to resolve "es2015" property in package.json over the regular "module" property).

Is it possible to add an option to use this new format in --ng4 projects ?

I'm impressed by @angular/cli rc.0, my only concern is the bundles sizes. With the same app, and manual (but very simple) config of a packager, vendor + main was 1,0Mo with rollup and 1,2Mo with webpack 2 / @ngtools/webpack AotPlugin. With @angular/cli (prod mode), it's 1,5Mo...

Is at least classic tree shaking with module: "es2015" activated by default ?

Would like to help/test, but I don't know where the webpack config is managed in this project.

@filipesilva
Copy link
Contributor

I was looking into this yesterday and there wasn't much improvement actually. It stems from webpack not actually doing tree shaking (#2901). It's one of the next big action items for webpack so we're waiting for that.

@cyrilletuzi
Copy link
Contributor Author

OK, thanks.

Is there a reason to the current 0,3Mo surplus with @angular/cli ? I was using manually AotPlugin of @ngtools/webpack, like @angular/cli, so I don't understand such an important difference.

@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Sep 6, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants