CN-90 fix: 色阶增加单位
This commit is contained in:
@@ -1,7 +1,9 @@
|
||||
/* eslint-disable @typescript-eslint/no-var-requires */
|
||||
const path = require('path')
|
||||
const webpack = require('webpack')
|
||||
const UglifyJsPlugin = require('uglifyjs-webpack-plugin')
|
||||
const CompressionWebpackPlugin = require('compression-webpack-plugin')
|
||||
const productionGzipExtensions = ['js', 'css']
|
||||
// const UglifyJsPlugin = require('uglifyjs-webpack-plugin')
|
||||
const { VueLoaderPlugin } = require('vue-loader')
|
||||
// const BundleAnalyzerPlugin = require('webpack-bundle-analyzer').BundleAnalyzerPlugin
|
||||
|
||||
@@ -66,6 +68,14 @@ const config = {
|
||||
|
||||
const plugins = [
|
||||
new VueLoaderPlugin(),
|
||||
new CompressionWebpackPlugin({
|
||||
filename: '[path].gz[query]',
|
||||
algorithm: 'gzip',
|
||||
test: /\.(js|css|json|txt|html|ico|svg)(\?.*)?$/i, // 匹配文件名
|
||||
threshold: 10240, // 对10K以上的数据进行压缩
|
||||
minRatio: 0.8,
|
||||
deleteOriginalAssets: false // 是否删除源文件
|
||||
})/*,
|
||||
new UglifyJsPlugin({
|
||||
uglifyOptions: {
|
||||
compress: {
|
||||
@@ -76,7 +86,7 @@ const plugins = [
|
||||
exclude: /manifest.+js/,
|
||||
sourceMap: config.build.productionSourceMap,
|
||||
parallel: true
|
||||
})
|
||||
})*/
|
||||
// new BundleAnalyzerPlugin(),
|
||||
]
|
||||
|
||||
|
||||
Reference in New Issue
Block a user