-
Notifications
You must be signed in to change notification settings - Fork 4.4k
Switch to uglifyjs-webpack-plugin #1119
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
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
How does this compare to babel-minify? Any experience with both? |
I had tried |
LinusBorg
approved these changes
Dec 2, 2017
Thanks |
LinusBorg
added a commit
that referenced
this pull request
Dec 2, 2017
* develop: bump version 1.2.5 some small updates to the docs Adds support for the video poster attribute (#1123) babel-register use only for e2e tests (#1120) Update project creation: sort dependencies in package.json (#1118) Fix bug from PR #1082 FIX: convert env variable PORT to a number. Minor refactoring of build scripts (#1082) ESLint config clean up (#1093) Switch to uglifyjs-webpack-plugin (#1119) change bad spaces into normal spaces and removing trailing space (#1132) prevent empty line when unit = y & e2e = n Update meta.js (#1091) docs(README): Update usage to init from develop branch (#1092) Use actual host for notification (#1101). (#1103) prevent webpack from injecting useless mocks
frandiox
pushed a commit
to OnsenUI/vue-cordova-webpack
that referenced
this pull request
Dec 25, 2017
shenron
pushed a commit
to shenron/webpack
that referenced
this pull request
Mar 20, 2018
shenron
pushed a commit
to shenron/webpack
that referenced
this pull request
Mar 20, 2018
* develop: bump version 1.2.5 some small updates to the docs Adds support for the video poster attribute (vuejs-templates#1123) babel-register use only for e2e tests (vuejs-templates#1120) Update project creation: sort dependencies in package.json (vuejs-templates#1118) Fix bug from PR vuejs-templates#1082 FIX: convert env variable PORT to a number. Minor refactoring of build scripts (vuejs-templates#1082) ESLint config clean up (vuejs-templates#1093) Switch to uglifyjs-webpack-plugin (vuejs-templates#1119) change bad spaces into normal spaces and removing trailing space (vuejs-templates#1132) prevent empty line when unit = y & e2e = n Update meta.js (vuejs-templates#1091) docs(README): Update usage to init from develop branch (vuejs-templates#1092) Use actual host for notification (vuejs-templates#1101). (vuejs-templates#1103) prevent webpack from injecting useless mocks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
This switches to
uglifyjs-webpack-plugin
for minification which uses UglifyJS v3 (uglify-es
) to minify javascript.Why is this required
Right now, we use
babel-preset-env
with some browser versions as the target. This dynamic config may break minification because currently the uglify plugin shipped in webpack 2 doesn't support ES6+. For example, if I change mytarget.browsers
to["last 2 Chrome versions", "last 2 Firefox versions"]
it will break uglify. Since this template is meant to be customised by developers, it would be better to have a more robust method for minification.Also see discussion in vuejs-templates/pwa#44. If this PR is approved here, I'll make a PR to the
pwa
template as well.