Some bundle size reductions and improvments (#3457)

Этот коммит содержится в:
Christopher Speller
2016-06-30 12:26:04 -04:00
коммит произвёл Joram Wilander
родитель f0c387045f
Коммит dab4bb4321
2 изменённых файлов: 8 добавлений и 8 удалений

Просмотреть файл

@@ -51,6 +51,7 @@
"file-loader": "0.8.5", "file-loader": "0.8.5",
"html-loader": "0.4.3", "html-loader": "0.4.3",
"imports-loader": "0.6.5", "imports-loader": "0.6.5",
"image-webpack-loader": "1.8.0",
"jquery-deferred": "0.3.0", "jquery-deferred": "0.3.0",
"jsdom": "9.0.0", "jsdom": "9.0.0",
"jsdom-global": "1.7.0", "jsdom-global": "1.7.0",

Просмотреть файл

@@ -28,7 +28,8 @@ var config = {
output: { output: {
path: 'dist', path: 'dist',
publicPath: '/static/', publicPath: '/static/',
filename: 'bundle.js' filename: 'bundle.js',
chunkFilename: '[name].[hash].[chunkhash].js'
}, },
module: { module: {
loaders: [ loaders: [
@@ -73,10 +74,10 @@ var config = {
}, },
{ {
test: /\.(png|eot|tiff|svg|woff2|woff|ttf|gif|mp3|jpg)$/, test: /\.(png|eot|tiff|svg|woff2|woff|ttf|gif|mp3|jpg)$/,
loader: 'file', loaders: [
query: { 'file?name=files/[hash].[ext]',
name: 'files/[hash].[ext]' 'image-webpack'
} ]
}, },
{ {
test: /\.html$/, test: /\.html$/,
@@ -108,10 +109,8 @@ var config = {
}), }),
new webpack.optimize.CommonsChunkPlugin({ new webpack.optimize.CommonsChunkPlugin({
minChunks: 2, minChunks: 2,
children: true, children: true
name: 'main'
}) })
//new webpack.optimize.AggressiveMergingPlugin()
], ],
resolve: { resolve: {
alias: { alias: {