|
|
@ -2,7 +2,7 @@ const webpack = require('webpack'); |
|
|
|
const merge = require('webpack-merge'); |
|
|
|
const merge = require('webpack-merge'); |
|
|
|
const MiniCssExtractPlugin = require("mini-css-extract-plugin"); |
|
|
|
const MiniCssExtractPlugin = require("mini-css-extract-plugin"); |
|
|
|
const vars = require('postcss-simple-vars'); |
|
|
|
const vars = require('postcss-simple-vars'); |
|
|
|
|
|
|
|
const OptimizeCssAssetsPlugin = require('optimize-css-assets-webpack-plugin'); |
|
|
|
const dirs = require('./dirs'); |
|
|
|
const dirs = require('./dirs'); |
|
|
|
|
|
|
|
|
|
|
|
const common = require('./webpack.common.js'); |
|
|
|
const common = require('./webpack.common.js'); |
|
|
@ -25,6 +25,19 @@ module.exports = merge.smart(common, { |
|
|
|
}), |
|
|
|
}), |
|
|
|
new webpack.BannerPlugin({ |
|
|
|
new webpack.BannerPlugin({ |
|
|
|
banner: `time: ${new Date().toLocaleString()}` |
|
|
|
banner: `time: ${new Date().toLocaleString()}` |
|
|
|
|
|
|
|
}), |
|
|
|
|
|
|
|
new OptimizeCssAssetsPlugin({ |
|
|
|
|
|
|
|
assetNameRegExp: /\.css$/g, |
|
|
|
|
|
|
|
cssProcessor: require('cssnano'), |
|
|
|
|
|
|
|
cssProcessorPluginOptions: { |
|
|
|
|
|
|
|
preset: ['default', { |
|
|
|
|
|
|
|
discardComments: { |
|
|
|
|
|
|
|
removeAll: true, |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
normalizeUnicode: false |
|
|
|
|
|
|
|
}] |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
canPrint: true |
|
|
|
}) |
|
|
|
}) |
|
|
|
], |
|
|
|
], |
|
|
|
|
|
|
|
|
|
|
|