Last active
June 15, 2017 14:47
-
-
Save MarcelRobitaille/c3b61da50222cb5869adc45000f5b236 to your computer and use it in GitHub Desktop.
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
909ms building modules | |
13ms sealing | |
0ms optimizing | |
0ms basic module optimization | |
2ms module optimization | |
1ms advanced module optimization | |
9ms basic chunk optimization | |
0ms chunk optimization | |
1ms advanced chunk optimization | |
15ms module and chunk tree optimization | |
11ms module reviving | |
1ms module order optimization | |
4ms module id optimization | |
4ms chunk reviving | |
1ms chunk order optimization | |
2ms chunk id optimization | |
6ms hashing | |
0ms module assets processing | |
12ms chunk assets processing | |
1ms additional chunk assets processing | |
0ms recording | |
2ms additional asset processing | |
213ms chunk asset optimization | |
133ms asset optimization | |
20ms emitting | |
Hash: 3d130bfec31b3ec4a629 | |
Version: webpack 2.6.1 | |
Time: 3438ms | |
Asset Size Chunks Chunk Names | |
schedule.js 202 kB 0 [emitted] schedule | |
device.js 55.1 kB 1 [emitted] device | |
settings.js 46.9 kB 2 [emitted] settings | |
common.js 323 kB 3 [emitted] [big] common | |
schedule.js.map 260 kB 0 [emitted] schedule | |
device.js.map 69.4 kB 1 [emitted] device | |
settings.js.map 60.7 kB 2 [emitted] settings | |
common.js.map 392 kB 3 [emitted] common | |
[18] ./functions/$/index.js 565 bytes {0} {2} [built] | |
[] -> factory:160ms building:0ms = 160ms | |
[28] ./source/js/error.js 1.19 kB {3} [built] | |
[] -> factory:242ms building:26ms dependencies:101ms = 369ms | |
[120] ./source/js/device/index.js 62 bytes {1} [built] | |
[] -> factory:7ms building:338ms = 345ms | |
[121] ./source/js/schedule/index.js 102 bytes {0} [built] | |
[] -> factory:0ms building:177ms = 177ms | |
[122] ./source/js/settings/index.js 37 bytes {2} [built] | |
[] -> factory:0ms building:173ms = 173ms | |
[142] ./source/js/device/info.js 1.63 kB {1} [built] | |
[] -> factory:14ms building:160ms dependencies:220ms = 394ms | |
[143] ./source/js/device/settings.js 3.23 kB {1} [built] | |
[] -> factory:13ms building:0ms = 13ms | |
[144] ./source/js/schedule/add-dialog-controller.js 9.19 kB {0} [built] | |
[] -> factory:2ms building:0ms dependencies:59ms = 61ms | |
[145] ./source/js/schedule/card-settings-dialog-controller.js 4.46 kB {0} [built] | |
[] -> factory:2ms building:377ms dependencies:6ms = 385ms | |
[146] ./source/js/settings/rooms.js 2.88 kB {2} [built] | |
[] -> factory:7ms building:0ms dependencies:160ms = 167ms | |
[250] multi ./source/js/device/index.js 28 bytes {1} [built] | |
factory:0ms building:1ms = 1ms | |
[251] multi ./source/js/schedule/index.js 28 bytes {0} [built] | |
factory:0ms building:0ms = 0ms | |
[252] multi ./source/js/settings/index.js 28 bytes {2} [built] | |
factory:0ms building:0ms = 0ms | |
[253] multi regenerator-runtime/runtime ./~/material-design-lite/material.js 40 bytes {3} [built] | |
factory:0ms building:0ms = 0ms | |
+ 240 hidden modules | |
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
const path = require('path') | |
const process = require('process') | |
const webpack = require('webpack') | |
const HardSourceWebpackPlugin = require('hard-source-webpack-plugin') | |
const CompressionPlugin = require('compression-webpack-plugin') | |
const BundleAnalyzerPlugin = require('webpack-bundle-analyzer').BundleAnalyzerPlugin | |
const Dbust = require('webpack-dbust') | |
const debug = process.env.NODE_ENV === 'development' | |
const plugins = [ | |
new HardSourceWebpackPlugin(), | |
new webpack.optimize.CommonsChunkPlugin({ name: 'common', filename: debug ? 'common.js' : 'common-[chunkhash].js' }), | |
] | |
if (!debug) plugins.push(...[ | |
new webpack.optimize.UglifyJsPlugin({ mangle: false, sourcemap: false }), | |
new CompressionPlugin(), | |
new Dbust({ base: __dirname, autosave: process.env.WEBPACK_SOURCE !== 'gulp' }), | |
new webpack.IgnorePlugin(/^\.\/locale$/, /moment$/), | |
]) | |
if (process.env.WEBPACK_ANALYZE === 'true') { | |
plugins.push(new BundleAnalyzerPlugin()) | |
} | |
module.exports = { | |
devtool: debug ? 'source-map' : false, | |
plugins, | |
entry: { | |
'device': [ | |
'./source/js/device/index.js', | |
], | |
'settings': [ | |
'./source/js/settings/index.js', | |
], | |
'schedule': [ | |
'./source/js/schedule/index.js', | |
], | |
'common': [ | |
'regenerator-runtime/runtime', | |
'./node_modules/material-design-lite/material.js', | |
], | |
}, | |
output: { | |
// Set output path to 'public' for debug and 'build' for prod | |
path: path.join(__dirname, debug ? 'public' : 'build', 'js'), | |
// Don't change filename for debug | |
// Cache bust filename for prod | |
filename: debug ? '[name].js' : '[name]-[chunkhash].js', | |
}, | |
module: { | |
rules: [{ | |
test: /\.js$/, | |
exclude: [ | |
path.resolve(__dirname, 'node_modules'), | |
], | |
use: { | |
loader: 'babel-loader', | |
options: { | |
plugins: ['transform-class-properties'], | |
presets: ['env'], | |
}, | |
}, | |
}, { | |
test: /\.pug$/, | |
exclude: [ | |
path.resolve(__dirname, 'node_modules'), | |
], | |
use: { | |
loader: 'pug-loader', | |
}, | |
}], | |
}, | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment