[Build] optimize webpack config

This commit is contained in:
陈嘉涵
2018-05-09 22:44:59 +08:00
parent 26a22fe48f
commit bf05e1e9e1
7 changed files with 11 additions and 20 deletions

13
build/webpack.doc.js Normal file
View File

@@ -0,0 +1,13 @@
const path = require('path');
const devConfig = require('./webpack.dev.js');
module.exports = Object.assign({}, devConfig, {
mode: 'production',
output: {
path: path.join(__dirname, '../docs/dist'),
publicPath: 'https://img.yzcdn.cn/zanui/vant/',
filename: '[name].[hash:8].js',
umdNamedDefine: true,
chunkFilename: 'async_[name].[chunkhash:8].js'
}
});