|
@@ -41,25 +41,24 @@ module.exports = (function () {
|
|
|
// name: 'vendors',
|
|
|
// chunks: ['vendor']
|
|
|
// }),
|
|
|
-
|
|
|
- // /* 配置好Dll */
|
|
|
- // new webpack.DllReferencePlugin({
|
|
|
- // context: dirVars.staticRootDir, // 指定一个路径作为上下文环境,需要与DllPlugin的context参数保持一致,建议统一设置为项目根目录
|
|
|
- // manifest: require('./dll/'+argv.env.deploy+'/manifest.json') // 指定manifest.json
|
|
|
- // }),
|
|
|
- // // 把dll文件复制到打包后的文件中
|
|
|
- // new CopyWebpackPlugin([
|
|
|
- // {
|
|
|
- // from: path.resolve('./dll/'+argv.env.deploy),
|
|
|
- // to: (__dirname, './'),
|
|
|
- // ignore: ['.*']
|
|
|
- // }
|
|
|
- // ]),
|
|
|
- // // 将 dll.js 插入HTML里
|
|
|
- // new HtmlWebpackIncludeAssetsPlugin({
|
|
|
- // assets: [(__dirname, 'vendors.js'),(__dirname, 'vendors.css')],
|
|
|
- // append: false
|
|
|
- // }),
|
|
|
+ /* 配置好Dll */
|
|
|
+ new webpack.DllReferencePlugin({
|
|
|
+ context: dirVars.staticRootDir, // 指定一个路径作为上下文环境,需要与DllPlugin的context参数保持一致,建议统一设置为项目根目录
|
|
|
+ manifest: require('./dll/'+argv.env.deploy+'/manifest.json') // 指定manifest.json
|
|
|
+ }),
|
|
|
+ // 把dll文件复制到打包后的文件中
|
|
|
+ new CopyWebpackPlugin([
|
|
|
+ {
|
|
|
+ from: path.resolve('./dll/'+argv.env.deploy),
|
|
|
+ to: (__dirname, './dll/'),
|
|
|
+ ignore: ['.*']
|
|
|
+ }
|
|
|
+ ]),
|
|
|
+ // 将 dll.js 插入HTML里
|
|
|
+ new HtmlWebpackIncludeAssetsPlugin({
|
|
|
+ assets: [(__dirname, 'dll/dll.js'),(__dirname, 'dll/dll.css')],
|
|
|
+ append: false
|
|
|
+ }),
|
|
|
|
|
|
new ExtractTextPlugin({
|
|
|
filename: "[name].css",
|