Optimize commonsChunk more

pull/504/head
Rick Carlino 2017-10-16 18:23:22 -05:00
parent 248b994a44
commit 1481102487
3 changed files with 31 additions and 8 deletions

View File

@ -8,6 +8,25 @@ module.exports = function () {
"verification": "./webpack/verification.ts",
"password_reset": "./webpack/password_reset/index.tsx",
"tos_update": "./webpack/tos_update/index.tsx"
// "vendor": [
// "axios",
// "boxed_value",
// "farmbot",
// "farmbot-toastr",
// "fastclick",
// "i18next",
// "lodash",
// "markdown-it",
// "markdown-it-emoji",
// "moment",
// "react",
// "react-color",
// "react-dom",
// "react-redux",
// "react-router",
// "redux",
// "redux-thunk"
// ]
},
devtool: "eval",
module: {

View File

@ -19,7 +19,18 @@ conf.output = {
[
new webpack.optimize.CommonsChunkPlugin({
name: "commons",
async: true
chunks: [
"bundle",
"front_page",
"verification",
"password_reset",
"tos_update"
],
minChunks: ({ resource }) => (
resource &&
resource.indexOf('node_modules') >= 0 &&
resource.match(/\.js$/)
),
}),
new ExtractTextPlugin({
// Temporary hotfix for some issues on staging.

View File

@ -27,12 +27,9 @@
},
"dependencies": {
"@blueprintjs/core": "^1.29.0",
"@blueprintjs/datetime": "^1.22.0",
"@blueprintjs/labs": "^0.4.0",
"@types/deep-freeze": "^0.1.1",
"@types/enzyme": "^2.8.9",
"@types/fastclick": "^1.0.28",
"@types/handlebars": "^4.0.36",
"@types/history": "^4.6.0",
"@types/i18next": "^8.4.2",
"@types/jest": "^21.1.2",
@ -41,7 +38,6 @@
"@types/moxios": "^0.4.5",
"@types/mqtt": "^0.0.34",
"@types/node": "^8.0.34",
"@types/offline-js": "^0.7.28",
"@types/react": "15.0.39",
"@types/react-color": "^2.13.2",
"@types/react-dom": "^15.5.5",
@ -52,14 +48,12 @@
"boxed_value": "^1.0.0",
"coveralls": "^3.0.0",
"css-loader": "^0.28.7",
"deep-freeze": "^0.0.1",
"enzyme": "^2.9.1",
"extract-text-webpack-plugin": "^3.0.1",
"farmbot": "5.0.1-rc13",
"farmbot-toastr": "^1.0.3",
"fastclick": "^1.0.6",
"file-loader": "^1.1.5",
"handlebars": "^4.0.10",
"i18next": "^9.0.0",
"imports-loader": "^0.7.0",
"jest": "^21.2.1",
@ -70,7 +64,6 @@
"moment": "^2.19.1",
"moxios": "^0.4.0",
"node-sass": "^4.5.3",
"offline-js": "^0.7.19",
"optimize-css-assets-webpack-plugin": "^3.2.0",
"react": "^15.6.1",
"react-addons-css-transition-group": "^15.6.2",