|
@@ -3,6 +3,7 @@ const HtmlWebpackPlugin = require('html-webpack-plugin');
|
|
const CleanWebpackPlugin = require('clean-webpack-plugin') // 清空打包目录的插件
|
|
const CleanWebpackPlugin = require('clean-webpack-plugin') // 清空打包目录的插件
|
|
const MiniCssExtractPlugin = require('mini-css-extract-plugin');
|
|
const MiniCssExtractPlugin = require('mini-css-extract-plugin');
|
|
const UglifyJsPlugin = require('uglifyjs-webpack-plugin');
|
|
const UglifyJsPlugin = require('uglifyjs-webpack-plugin');
|
|
|
|
+const CopyWebpackPlugin = require('copy-webpack-plugin');
|
|
const ExtractTextPlugin = require("extract-text-webpack-plugin");
|
|
const ExtractTextPlugin = require("extract-text-webpack-plugin");
|
|
const webpack = require('webpack');
|
|
const webpack = require('webpack');
|
|
const proxyHost = "http://192.168.2.241:5050";
|
|
const proxyHost = "http://192.168.2.241:5050";
|
|
@@ -91,6 +92,13 @@ module.exports = {
|
|
collapseWhitespace: true //删除空白符与换行符
|
|
collapseWhitespace: true //删除空白符与换行符
|
|
}
|
|
}
|
|
}),
|
|
}),
|
|
|
|
+ new CopyWebpackPlugin([
|
|
|
|
+ {
|
|
|
|
+ from:'src/resources',
|
|
|
|
+ to:path.resolve(__dirname,'dist','resources'),
|
|
|
|
+ flatten:true, //false会拷贝原始文件夹路径
|
|
|
|
+ }
|
|
|
|
+ ]),
|
|
new MiniCssExtractPlugin({
|
|
new MiniCssExtractPlugin({
|
|
filename: 'css/[name].css',
|
|
filename: 'css/[name].css',
|
|
chunkFilename: '[id].css'
|
|
chunkFilename: '[id].css'
|