3 Star 0 Fork 0

胖子AK / kvw

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
webpack.dll.js 758 Bytes
一键复制 编辑 原始数据 按行查看 历史
lihao 提交于 2017-07-01 11:22 . ====
const path = require('path'),
webpack = require('webpack'),
Visualizer = require('webpack-visualizer-plugin');
const vendors = [
'avalon2',
'jquery',
'scriptjs',
'bluebird',
'bootstrap',
];
module.exports = {
output: {
path: path.join(__dirname, 'public/dll/'),
filename: '[name].js',
library: '[name]',
},
resolve: {
modules : ['node_modules'],
extensions: ['.js', '.jsx', '.json'],
},
entry: {
vendor: vendors,
},
plugins: [
new webpack.DllPlugin({
path: path.join(__dirname, 'public/dll/vendors.json'),
name: '[name]',
context: '/',
}),
new webpack.DefinePlugin({
'process.env': {
NODE_ENV: JSON.stringify(process.env.NODE_ENV),
},
}),
new Visualizer({
filename: './vendors.html',
}),
],
};
NodeJS
1
https://gitee.com/dokak47/kvw.git
git@gitee.com:dokak47/kvw.git
dokak47
kvw
kvw
master

搜索帮助