-
Notifications
You must be signed in to change notification settings - Fork 400
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
Add bundlesize #5810
Merged
+353
−102
Merged
Add bundlesize #5810
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,8 +8,12 @@ | |
"node": ">=6 <=8" | ||
}, | ||
"scripts": { | ||
"build": "bin/build-checks.js && better-npm-run build", | ||
"build": "npm run clean && better-npm-run build", | ||
"build-all": "npm run clean && NODE_APP_INSTANCE=amo better-npm-run build && NODE_APP_INSTANCE=disco better-npm-run build", | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. But what if we add a new app??! I'm only kidding. I hope we never do that. |
||
"build-check": "bin/build-checks.js", | ||
"build-ci": "npm run build-all && npm run bundlesize", | ||
"build-locales": "bin/build-locales", | ||
"bundlesize": "bundlesize", | ||
"extract-locales": "better-npm-run extract-locales", | ||
"clean": "rimraf './dist/*!(.gitkeep)' './webpack-assets.json' './src/locale/**(!.gitkeep)'", | ||
"amo": "better-npm-run amo", | ||
|
@@ -41,7 +45,7 @@ | |
}, | ||
"betterScripts": { | ||
"build": { | ||
"command": "npm run clean && npm run version-check && npm run build-locales && webpack --bail --verbose --display-error-details --progress --colors --config webpack.prod.config.babel.js", | ||
"command": "npm run build-check && npm run version-check && npm run build-locales && webpack --bail --verbose --display-error-details --progress --colors --config webpack.prod.config.babel.js", | ||
"env": { | ||
"NODE_ICU_DATA": "./node_modules/full-icu", | ||
"NODE_PATH": "./:./src" | ||
|
@@ -237,6 +241,7 @@ | |
"babel-preset-stage-2": "^6.24.1", | ||
"babel-register": "^6.24.1", | ||
"bundle-loader": "^0.5.5", | ||
"bundlesize": "^0.17.0", | ||
"chalk": "^2.0.1", | ||
"cheerio": "^1.0.0-rc.2", | ||
"chokidar-cli": "^1.2.0", | ||
|
@@ -297,5 +302,15 @@ | |
"webpack-hot-middleware": "^2.18.0", | ||
"webpack-subresource-integrity": "^1.0.0-rc.1" | ||
}, | ||
"bundlesize": [ | ||
{ | ||
"path": "./dist/@(amo|disco)-!(i18n-)*.js", | ||
"maxSize": "400 kB" | ||
}, | ||
{ | ||
"path": "./dist/@(amo|disco)-i18n-*.js", | ||
"maxSize": "25 kB" | ||
} | ||
], | ||
"snyk": true | ||
} |
Oops, something went wrong.
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.
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.
Good idea