Commit 033d3689 by hank

html

parent f9185442
const UglifyJsPlugin = require('uglifyjs-webpack-plugin'); const UglifyJsPlugin = require('uglifyjs-webpack-plugin');
const InlineSourcePlugin = require('./plugins/InlineSoucePlugins');
const isProduction = process.env.NODE_ENV === 'production'; const isProduction = process.env.NODE_ENV === 'production';
const path = require('path'); const path = require('path');
function resolve(dir) { function resolve(dir) {
...@@ -65,7 +66,7 @@ module.exports = { ...@@ -65,7 +66,7 @@ module.exports = {
// return args; // return args;
// }); // });
// } // }
// console.dir(config.module) console.log(Object.values(config.module.rules)[1])
}, },
configureWebpack: config => { configureWebpack: config => {
if (isProduction) { if (isProduction) {
...@@ -95,6 +96,9 @@ module.exports = { ...@@ -95,6 +96,9 @@ module.exports = {
parallel: true, parallel: true,
}) })
); );
config.plugins.push(new InlineSourcePlugin({
match: /\.(js|css)/
}))
} else { } else {
// 为开发环境修改配置... // 为开发环境修改配置...
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment