-
Notifications
You must be signed in to change notification settings - Fork 2.1k
chore(infrastructure): update webpack v4.x #4847
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Right now the JS file and min.js file are both minified -- meaning they are exactly the same. This means we could remove the min.js file.
Codecov Report
@@ Coverage Diff @@
## master #4847 +/- ##
=======================================
Coverage 98.86% 98.86%
=======================================
Files 119 119
Lines 5650 5650
Branches 749 749
=======================================
Hits 5586 5586
Misses 63 63
Partials 1 1 Continue to review full report at Codecov.
|
All 693 screenshot tests passed for commit d1a1ec9 vs. |
Why would be remove *.min.js files? |
Did you see any difference in build time compared to Webpack 3? |
by default they the bundles are all minified. So there's no need to have both as they are the same. |
We need to continue publishing both minified and un-minified versions like before. Un-minified version is useful for development / debugging. |
We can provide maps instead of un-minified (which we already actually do). I don't think un-minified is totally necessary. |
We shouldn't break existing publish structure as part of this upgrade, IMO. I'm not expert in this area, but it is fairly common practice to publish minified & un-minified. |
Fair point! I'll make it exactly as it was. |
All 693 screenshot tests passed for commit 2981439 vs. |
@abhiomkar ready to go again |
All 693 screenshot tests passed for commit 5d50bbf vs. |
All 693 screenshot tests passed for commit 774b4ea vs. |
So there's good news and bad news. 👍 The good news is that everyone that needs to sign a CLA (the pull request submitter and all commit authors) have done so. Everything is all good there. 😕 The bad news is that it appears that one or more commits were authored or co-authored by someone other than the pull request submitter. We need to confirm that all authors are ok with their commits being contributed to this project. Please have them confirm that here in the pull request. Note to project maintainer: This is a terminal state, meaning the ℹ️ Googlers: Go here for more info. |
All 699 screenshot tests passed for commit e9da478 vs. |
scripts/cp-pkgs.js
Outdated
main, | ||
out: destFilename, | ||
const main = path.join(PACKAGES_DIRECTORY, packageDirectory, './index.d.ts'); | ||
fs.access(main, fs.constants.F_OK, (err) => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: error*
scripts/cp-pkgs.js
Outdated
out: destFilename, | ||
const main = path.join(PACKAGES_DIRECTORY, packageDirectory, './index.d.ts'); | ||
fs.access(main, fs.constants.F_OK, (err) => { | ||
if (!err) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if (error) {
return;
}
Returns early if error exist. This avoids nested block and makes it easy to read.
…ts/material-components-web into chore/update-webpack-4
All 699 screenshot tests passed for commit 4bf3375 vs. |
A Googler has manually verified that the CLAs look good. (Googler, please make sure the reason for overriding the CLA status is clearly documented in these comments.) ℹ️ Googlers: Go here for more info. |
fixes #4842
webpack3 (master branch):
npm run dist
:webpack4 (with 2 minified file build):- runningnpm run dist
:- 1:09- 1:09- 1:12webpack4 (with minified and non-minified builds):
npm run dist
:Build time decreased by 49.14%