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

feat(@angular/cli): add scope hoisting via webpack 3 #6365

Merged
merged 1 commit into from Jul 10, 2017

Conversation

filipesilva
Copy link
Contributor

@filipesilva filipesilva commented May 18, 2017

This should result in significant bundle size reduction. For best results, build for production with --vendor-chunk=false.

See https://medium.com/webpack/webpack-3-official-release-15fd2dd8f07b for details.


Blockers for this to get merged:

@@ -97,11 +97,11 @@ export function getCommonConfig(wco: WebpackConfigOptions) {
].concat(extraPlugins),
node: {
fs: 'empty',
global: true,
global: 'empty',
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

global only supports a boolean. Ref: https://webpack.js.org/configuration/node/#node-global

@filipesilva filipesilva force-pushed the scope-hoisting branch 9 times, most recently from 22d4663 to 2c588dc Compare June 12, 2017 13:50
@filipesilva filipesilva force-pushed the scope-hoisting branch 3 times, most recently from bfb15ba to e429c1d Compare June 13, 2017 15:06
@intellix
Copy link
Contributor

:shipit: It seems they released Scope hoisting and blog posted about it

@filipesilva
Copy link
Contributor Author

Pushed an update that uses webpack@3.0.0, but there seem to be some performance regressions atm: webpack/webpack#4863.

@TheLarkInn
Copy link
Member

We have a few PRs we are hoping to land within this next few weeks. It should good the perf regressions, in theory.

@joshwiens
Copy link
Contributor

joshwiens commented Jun 22, 2017

@filipesilva - extract-text-webpack-plugin@3.0.0-beta.3 || just the @beta tag is out on npm. There will be at least one more beta build, though nothing breaking going forward.

Changelog for 3.0.0 can be found here - https://github.com/webpack-contrib/extract-text-webpack-plugin/blob/feature/webpack3/CHANGELOG.md

html-webpack-plugin was waiting on webpack-contrib/extract-text-webpack-plugin#540, I put a note in that PR as well.

less-loader will be sorted this weekend.

@filipesilva filipesilva force-pushed the scope-hoisting branch 5 times, most recently from 858cf66 to 0230806 Compare June 29, 2017 14:42
@filipesilva filipesilva changed the title feat(@angular/cli): add scope hoisting feat(@angular/cli): add scope hoisting via webpack 3 Jul 7, 2017
@filipesilva filipesilva force-pushed the scope-hoisting branch 3 times, most recently from d0d2723 to d371493 Compare July 7, 2017 10:02
@joshwiens
Copy link
Contributor

@filipesilva - You can check less-loader off your list https://github.com/webpack-contrib/less-loader/releases/tag/v4.0.5

Extract Text will make the dist-tag tomorrow evening.

@filipesilva
Copy link
Contributor Author

@d3viant0ne thank you for the heads up, I just updated this PR to use less-loader. For now it's still using extract-text-webpack-plugin@3.0.0-rc.2 but will be updated with 3.0.0 once it is released.

@filipesilva
Copy link
Contributor Author

This PR no longer automatically turn off vendor chunking in production builds, since it's benefits might be conditional on a bug that needs to be fixed. This can be added at a future date if needed.

This should result in significant bundle size reduction. For best results, build for production with `--vendor-chunk=false`.

See https://medium.com/webpack/webpack-3-official-release-15fd2dd8f07b for details.
@filipesilva
Copy link
Contributor Author

Updated to extract-text-webpack-plugin@3.0.0, which was the last missing piece.

I'd like to extend my thanks to @d3viant0ne and @TheLarkInn, they've been awesome in communicating changes and releases in the Webpack 3 rollout, cheers!

Copy link
Contributor

@hansl hansl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

@hansl hansl merged commit fe85750 into angular:master Jul 10, 2017
@filipesilva filipesilva mentioned this pull request Jul 18, 2017
@filipesilva filipesilva deleted the scope-hoisting branch July 18, 2017 14:38
@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 12, 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

Successfully merging this pull request may close these issues.

None yet

8 participants