size of bundle.js |
|
---|---|
webpack 1 + original .babelrc |
1,905,457 Bytes |
webpack 2 + original .babelrc |
1,984,761 Bytes |
webpack 2 + updated .babelrc |
1,900,329 Bytes |
ls
reports bundle.js
is 1,905,457 Bytes
$ npm run build
...
Hash: 092f1b667a0da995b3a8
Version: webpack 1.15.0
Time: 39426ms
Asset Size Chunks Chunk Names
903d6a160f661be0793082b09b8d0d61.svg 220 bytes [emitted]
6244caeeaadbc6d017238d4f33d70304.png 1.58 kB [emitted]
acbb7f8aef859a5c9c8416645773d0c7.png 1.93 kB [emitted]
74c336581f6f50a485d5f6f99f3a7c73.png 15.5 kB [emitted]
b8b46b27e13fea0bd3d6093c8ef7b7c9.png 24.6 kB [emitted]
50504fc7b3b42920c960744802198c83.png 15.5 kB [emitted]
27381796ff04104bb469c21036d35613.png 77.5 kB [emitted]
9bbb187cebcfe763ad044d9bd2037967.png 8.85 kB [emitted]
da76ed6ba32b319578641cdd6b66ae2f.svg 5.1 kB [emitted]
ba00be66104283d0157c27ae89732bcb.png 6.44 kB [emitted]
fd72d9b5184b47afb2f7b4db0c8a35de.svg 956 bytes [emitted]
7760fc8ff82f19f691112e8db27cbf40.svg 501 bytes [emitted]
a1222d2db7edbace628aafa3d8922288.svg 1.27 kB [emitted]
2382ea7ec7cc55bfe1cc7a3ea8326989.svg 6.2 kB [emitted]
common.js 1.26 kB 0 [emitted] common.js
bundle.js 1.88 MB 1, 0 [emitted] main
common.js.map 101 bytes 0 [emitted] common.js
bundle.js.map 481 bytes 1, 0 [emitted] main
+ 1588 hidden modules
real 0m41.450s
user 0m42.660s
sys 0m1.330s
ls
reports bundle.js
is 1,984,761 Bytes
$ time npm run build
...
Hash: c43ccd7f5bb370658193
Version: webpack 2.6.1
Time: 37373ms
Asset Size Chunks Chunk Names
da76ed6ba32b319578641cdd6b66ae2f.svg 5.1 kB [emitted]
6244caeeaadbc6d017238d4f33d70304.png 1.58 kB [emitted]
acbb7f8aef859a5c9c8416645773d0c7.png 1.93 kB [emitted]
74c336581f6f50a485d5f6f99f3a7c73.png 15.5 kB [emitted]
b8b46b27e13fea0bd3d6093c8ef7b7c9.png 24.6 kB [emitted]
50504fc7b3b42920c960744802198c83.png 15.5 kB [emitted]
27381796ff04104bb469c21036d35613.png 77.5 kB [emitted]
9bbb187cebcfe763ad044d9bd2037967.png 8.85 kB [emitted]
ba00be66104283d0157c27ae89732bcb.png 6.44 kB [emitted]
903d6a160f661be0793082b09b8d0d61.svg 220 bytes [emitted]
fd72d9b5184b47afb2f7b4db0c8a35de.svg 956 bytes [emitted]
7760fc8ff82f19f691112e8db27cbf40.svg 501 bytes [emitted]
a1222d2db7edbace628aafa3d8922288.svg 1.27 kB [emitted]
2382ea7ec7cc55bfe1cc7a3ea8326989.svg 6.2 kB [emitted]
bundle.js 1.96 MB 0 [emitted] [big] main
common.js 1.4 kB 1 [emitted] common
[0] ./~/react/react.js 56 bytes {0} [built]
[10] ./~/react-router/lib/index.js 4.6 kB {0} [built]
[15] ./~/babel-runtime/helpers/extends.js 544 bytes {0} [built]
[24] ./src/actions/modal.js 510 bytes {0} [built]
[25] ./~/react-router-redux/lib/index.js 1.97 kB {0} [built]
[28] ./src/constants.js 6.27 kB {0} [built]
[36] ./~/linode-components/modals/index.js 719 bytes {0} [built]
[100] ./src/api/configs/linodes.js 1.64 kB {0} [built]
[144] ./src/session.js 2.83 kB {0} [built]
[145] ./~/react-dom/index.js 59 bytes {0} [built]
[168] ./src/store.js 1.23 kB {0} [built]
[312] ./~/linode-components/errors/index.js 659 bytes {0} [built]
[313] ./src/actions/errors.js 1.23 kB {0} [built]
[626] ./~/linode-styleguide/src/Styleguide.js 1.68 kB {0} [built]
[730] ./src/index.js 6.07 kB {0} [built]
+ 1493 hidden modules
real 0m39.664s
user 0m41.153s
sys 0m1.265s
ls
reports bundle.js
is 1,900,329 Bytes
diff --git a/.babelrc b/.babelrc
index 0d44dcc1..adfed0ee 100644
--- a/.babelrc
+++ b/.babelrc
@@ -1,5 +1,11 @@
{
- "presets": ["stage-0", "react", "es2015"],
+ "presets": [
+ "stage-0",
+ "react",
+ ["es2015", {
+ "modules": false
+ }]
+ ],
"compact": true,
"plugins": [
"transform-runtime",
$ time npm run build
...
Hash: 9eb02af8b1de998dc2ba
Version: webpack 2.6.1
Time: 34349ms
Asset Size Chunks Chunk Names
da76ed6ba32b319578641cdd6b66ae2f.svg 5.1 kB [emitted]
6244caeeaadbc6d017238d4f33d70304.png 1.58 kB [emitted]
acbb7f8aef859a5c9c8416645773d0c7.png 1.93 kB [emitted]
74c336581f6f50a485d5f6f99f3a7c73.png 15.5 kB [emitted]
b8b46b27e13fea0bd3d6093c8ef7b7c9.png 24.6 kB [emitted]
50504fc7b3b42920c960744802198c83.png 15.5 kB [emitted]
27381796ff04104bb469c21036d35613.png 77.5 kB [emitted]
9bbb187cebcfe763ad044d9bd2037967.png 8.85 kB [emitted]
ba00be66104283d0157c27ae89732bcb.png 6.44 kB [emitted]
903d6a160f661be0793082b09b8d0d61.svg 220 bytes [emitted]
fd72d9b5184b47afb2f7b4db0c8a35de.svg 956 bytes [emitted]
7760fc8ff82f19f691112e8db27cbf40.svg 501 bytes [emitted]
a1222d2db7edbace628aafa3d8922288.svg 1.27 kB [emitted]
2382ea7ec7cc55bfe1cc7a3ea8326989.svg 6.2 kB [emitted]
bundle.js 1.87 MB 0 [emitted] [big] main
common.js 1.4 kB 1 [emitted] common
[0] ./~/react/react.js 56 bytes {0} [built]
[10] ./~/react-router/lib/index.js 4.6 kB {0} [built]
[15] ./~/babel-runtime/helpers/extends.js 544 bytes {0} [built]
[24] ./src/actions/modal.js 316 bytes {0} [built]
[25] ./~/react-router-redux/lib/index.js 1.97 kB {0} [built]
[28] ./src/constants.js 4.8 kB {0} [built]
[36] ./~/linode-components/modals/index.js 166 bytes {0} [built]
[100] ./src/api/configs/linodes.js 843 bytes {0} [built]
[143] ./src/session.js 2.21 kB {0} [built]
[640] ./src/support/index.js 446 bytes {0} [built]
[642] ./~/babel-polyfill/lib/index.js 833 bytes {0} [built]
[643] ./~/raven-js/src/singleton.js 878 bytes {0} [built]
[644] ./~/react-guard/index.js 3.13 kB {0} [built]
[645] ./scss/manager.scss 1.05 kB {0} [built]
[731] ./src/index.js 4.09 kB {0} [built]
+ 1494 hidden modules
WARNING in ./src/index.js
2:168-174 "export 'thunks' was not found in './api/configs/linodes'
real 0m36.421s
user 0m38.268s
sys 0m1.101s
ls
reports bundle.js
is 1,901,832 Bytes
diff --git a/package.json b/package.json
index cb98e0c9..f45ddd16 100644
--- a/package.json
+++ b/package.json
@@ -37,7 +37,7 @@
"babel-core": "^6.3.15",
"babel-eslint": "^6.1.2",
"babel-istanbul": "^0.8.0",
- "babel-loader": "^6.2.0",
+ "babel-loader": "^7.1.1",
"babel-plugin-istanbul": "^4.1.4",
"babel-plugin-transform-class-properties": "^6.18.0",
"babel-plugin-transform-runtime": "^6.4.0",
@@ -72,11 +72,11 @@
"karma-phantomjs-launcher": "^1.0.0",
"karma-sourcemap-loader": "^0.3.7",
"karma-spec-reporter": "0.0.26",
- "karma-webpack": "^1.7.0",
+ "karma-webpack": "^2.0.4",
"mocha": "^2.3.4",
"mocha-lcov-reporter": "^1.2.0",
"mockdate": "^1.0.4",
- "node-sass": "^3.4.2",
+ "node-sass": "^4.5.3",
"phantomjs-polyfill": "0.0.2",
"phantomjs-prebuilt": "^2.1.7",
"qrious": "^2.2.0",
@@ -84,10 +84,10 @@
"redux-devtools": "^3.3.1",
"redux-devtools-dock-monitor": "^1.1.1",
"redux-devtools-log-monitor": "^1.0.11",
- "sass-loader": "^3.1.2",
+ "sass-loader": "^6.0.6",
"sinon": "^2.0.0-pre.2",
"style-loader": "^0.13.0",
- "webpack": "^2.6.1",
+ "webpack": "^3.2.0",
"webpack-dev-middleware": "^1.4.0",
"webpack-hot-middleware": "^2.6.4",
"xunit-file": "^0.0.9"
$ time npm run build
...
Hash: eeace6458037fb13f65d
Version: webpack 3.2.0
Time: 34952ms
Asset Size Chunks Chunk Names
2382ea7ec7cc55bfe1cc7a3ea8326989.svg 6.2 kB [emitted]
6244caeeaadbc6d017238d4f33d70304.png 1.58 kB [emitted]
acbb7f8aef859a5c9c8416645773d0c7.png 1.93 kB [emitted]
74c336581f6f50a485d5f6f99f3a7c73.png 15.5 kB [emitted]
b8b46b27e13fea0bd3d6093c8ef7b7c9.png 24.6 kB [emitted]
27381796ff04104bb469c21036d35613.png 77.5 kB [emitted]
9bbb187cebcfe763ad044d9bd2037967.png 8.85 kB [emitted]
50504fc7b3b42920c960744802198c83.png 15.5 kB [emitted]
25 var path = require('path');
ba00be66104283d0157c27ae89732bcb.png 6.44 kB [emitted]
903d6a160f661be0793082b09b8d0d61.svg 220 bytes [emitted]
fd72d9b5184b47afb2f7b4db0c8a35de.svg 956 bytes [emitted]
a1222d2db7edbace628aafa3d8922288.svg 1.27 kB [emitted]
7760fc8ff82f19f691112e8db27cbf40.svg 501 bytes [emitted]
da76ed6ba32b319578641cdd6b66ae2f.svg 5.1 kB [emitted]
bundle.js 1.87 MB 0 [emitted] [big] main
common.js 1.37 kB 1 [emitted] common
[24] ./src/actions/modal.js 316 bytes {0} [built]
[31] ./src/constants.js 4.8 kB {0} [built]
[627] ./src/index.js 4.09 kB {0} [built]
[1334] ./src/layouts/Layout.js 4.94 kB {0} [built]
[1343] ./src/layouts/Logout.js 1.22 kB {0} [built]
[1344] ./src/layouts/OAuth.js 2.9 kB {0} [built]
[1345] ./src/linodes/index.js 384 bytes {0} [built]
[1447] ./src/linodes/linode/layouts/Weblish.js 4.36 kB {0} [built]
[1448] ./src/nodebalancers/index.js 402 bytes {0} [built]
[1462] ./src/profile/index.js 747 bytes {0} [built]
[1483] ./src/router.js 7.27 kB {0} [built]
[1488] ./src/settings/index.js 226 bytes {0} [built]
[1490] ./src/support/index.js 446 bytes {0} [built]
[1495] ./src/users/index.js 369 bytes {0} [built]
[1505] ./scss/manager.scss 1.06 kB {0} [built]
+ 1494 hidden modules
WARNING in ./src/index.js
2:168-174 "export 'thunks' was not found in './api/configs/linodes'
real 0m37.130s
user 0m38.554s
sys 0m1.281s
ls
reports bundle.js
is 1,895,035 Bytes
https://medium.com/webpack/brief-introduction-to-scope-hoisting-in-webpack-8435084c171f
diff --git a/webpack.config.prod.js b/webpack.config.prod.js
index 26d2881b..6271217c 100644
--- a/webpack.config.prod.js
+++ b/webpack.config.prod.js
@@ -23,6 +23,7 @@ _.plugins = [
'ENV_SENTRY_URL': JSON.stringify(process.env.SENTRY_URL),
'ENV_VERSION': JSON.stringify(_package.version)
}),
+ new webpack.optimize.ModuleConcatenationPlugin(),
new webpack.optimize.UglifyJsPlugin({
compressor: {
warnings: false
$ time npm run build
...
Hash: 5fbc528127eb155081c5
Version: webpack 3.2.0
Time: 34787ms
Asset Size Chunks Chunk Names
2382ea7ec7cc55bfe1cc7a3ea8326989.svg 6.2 kB [emitted]
6244caeeaadbc6d017238d4f33d70304.png 1.58 kB [emitted]
acbb7f8aef859a5c9c8416645773d0c7.png 1.93 kB [emitted]
74c336581f6f50a485d5f6f99f3a7c73.png 15.5 kB [emitted]
b8b46b27e13fea0bd3d6093c8ef7b7c9.png 24.6 kB [emitted]
27381796ff04104bb469c21036d35613.png 77.5 kB [emitted]
9bbb187cebcfe763ad044d9bd2037967.png 8.85 kB [emitted]
50504fc7b3b42920c960744802198c83.png 15.5 kB [emitted]
ba00be66104283d0157c27ae89732bcb.png 6.44 kB [emitted]
903d6a160f661be0793082b09b8d0d61.svg 220 bytes [emitted]
fd72d9b5184b47afb2f7b4db0c8a35de.svg 956 bytes [emitted]
a1222d2db7edbace628aafa3d8922288.svg 1.27 kB [emitted]
7760fc8ff82f19f691112e8db27cbf40.svg 501 bytes [emitted]
da76ed6ba32b319578641cdd6b66ae2f.svg 5.1 kB [emitted]
bundle.js 1.87 MB 0 [emitted] [big] main
common.js 1.37 kB 1 [emitted] common
[24] ./src/actions/modal.js 316 bytes {0} [built]
[31] ./src/constants.js 4.8 kB {0} [built]
[36] ./node_modules/linode-components/modals/index.js + 3 modules 4.69 kB {0} [built]
[116] ./src/api/configs/linodes.js 843 bytes {0} [built]
[162] ./src/session.js 2.21 kB {0} [built]
[204] ./src/store.js + 11 modules 7.76 kB {0} [built]
[402] ./src/actions/errors.js 811 bytes {0} [built]
[588] ./src/index.js + 103 modules 212 kB {0} [built]
[1199] ./src/linodes/layouts/IndexPage.js + 1 modules 8.56 kB {0} [built]
[1261] ./src/linodes/create/layouts/IndexPage.js + 2 modules 9.32 kB {0} [built]
[1262] ./src/nodebalancers/layouts/IndexPage.js 6.27 kB {0} [built]
[1263] ./src/nodebalancers/layouts/CreatePage.js 4.43 kB {0} [built]
[1268] ./src/profile/layouts/IndexPage.js 2.65 kB {0} [built]
[1274] ./src/settings/layouts/IndexPage.js 4.33 kB {0} [built]
[1278] ./scss/manager.scss 1.06 kB {0} [built]
+ 1267 hidden modules
WARNING in ./src/index.js
2:168-174 "export 'thunks' was not found in './api/configs/linodes'
real 0m36.962s
user 0m38.514s
sys 0m1.261s