mirror of
https://github.com/tenrok/vue-select.git
synced 2026-06-04 06:32:23 +03:00
52 lines
1.1 KiB
JavaScript
52 lines
1.1 KiB
JavaScript
var merge = require('webpack-merge')
|
|
var HtmlWebpackPlugin = require('html-webpack-plugin')
|
|
|
|
var baseWebpackConfig = require('./webpack.base.conf')
|
|
|
|
module.exports = merge(baseWebpackConfig, {
|
|
entry: './docs/homepage/home.js',
|
|
output: {
|
|
filename: 'js/[name].[hash].js',
|
|
chunkFilename: 'js/[id].[hash].js'
|
|
},
|
|
plugins: [
|
|
new HtmlWebpackPlugin({
|
|
filename: 'index.html',
|
|
template: './docs/homepage/home.html',
|
|
inject: true,
|
|
minify: {
|
|
removeComments: true,
|
|
collapseWhitespace: true,
|
|
removeAttributeQuotes: true
|
|
},
|
|
chunksSortMode: 'dependency'
|
|
}),
|
|
],
|
|
optimization: {
|
|
splitChunks: {
|
|
chunks: 'async',
|
|
minSize: 30000,
|
|
maxSize: 0,
|
|
minChunks: 1,
|
|
maxAsyncRequests: 5,
|
|
maxInitialRequests: 3,
|
|
automaticNameDelimiter: '~',
|
|
name: true,
|
|
cacheGroups: {
|
|
vendors: {
|
|
test: /[\\/]node_modules[\\/]/,
|
|
priority: -10
|
|
},
|
|
default: {
|
|
minChunks: 2,
|
|
priority: -20,
|
|
reuseExistingChunk: true
|
|
}
|
|
}
|
|
},
|
|
runtimeChunk: {
|
|
name: "manifest",
|
|
}
|
|
}
|
|
})
|