Some bundle size reductions and improvments (#3457)
Этот коммит содержится в:
коммит произвёл
Joram Wilander
родитель
f0c387045f
Коммит
dab4bb4321
@@ -51,6 +51,7 @@
|
||||
"file-loader": "0.8.5",
|
||||
"html-loader": "0.4.3",
|
||||
"imports-loader": "0.6.5",
|
||||
"image-webpack-loader": "1.8.0",
|
||||
"jquery-deferred": "0.3.0",
|
||||
"jsdom": "9.0.0",
|
||||
"jsdom-global": "1.7.0",
|
||||
|
||||
@@ -28,7 +28,8 @@ var config = {
|
||||
output: {
|
||||
path: 'dist',
|
||||
publicPath: '/static/',
|
||||
filename: 'bundle.js'
|
||||
filename: 'bundle.js',
|
||||
chunkFilename: '[name].[hash].[chunkhash].js'
|
||||
},
|
||||
module: {
|
||||
loaders: [
|
||||
@@ -73,10 +74,10 @@ var config = {
|
||||
},
|
||||
{
|
||||
test: /\.(png|eot|tiff|svg|woff2|woff|ttf|gif|mp3|jpg)$/,
|
||||
loader: 'file',
|
||||
query: {
|
||||
name: 'files/[hash].[ext]'
|
||||
}
|
||||
loaders: [
|
||||
'file?name=files/[hash].[ext]',
|
||||
'image-webpack'
|
||||
]
|
||||
},
|
||||
{
|
||||
test: /\.html$/,
|
||||
@@ -108,10 +109,8 @@ var config = {
|
||||
}),
|
||||
new webpack.optimize.CommonsChunkPlugin({
|
||||
minChunks: 2,
|
||||
children: true,
|
||||
name: 'main'
|
||||
children: true
|
||||
})
|
||||
//new webpack.optimize.AggressiveMergingPlugin()
|
||||
],
|
||||
resolve: {
|
||||
alias: {
|
||||
|
||||
Ссылка в новой задаче
Block a user