1 Star 0 Fork 0

辰風依恛/knife4j-vue

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
vue.config.js 1.79 KB
一键复制 编辑 原始数据 按行查看 历史
辰風依恛 提交于 2024-10-31 11:23 . 默认配置修改
const TerserPlugin = require("terser-webpack-plugin");
var path = require('path');
// const WebpackBundleAnalyzerPlugin = require('webpack-bundle-analyzer').BundleAnalyzerPlugin
const CompressionWebpackPlugin = require('compression-webpack-plugin');
const CopyWebPackPlugin = require('copy-webpack-plugin');
const productionGzipExtensions = ["js", "css"];
module.exports = {
transpileDependencies: [
/[/\\]node_modules[/\\](.+?)?mermaid(.*)/
],
publicPath: ".",
assetsDir: "webjars",
outputDir: "dist",
lintOnSave: false,
productionSourceMap: false,
indexPath: "doc.html",
css: {
loaderOptions: {
less: {
javascriptEnabled: true
}
}
},
devServer: {
watchOptions: {
ignored: /node_modules/
},
proxy: {
"/": {
//target: 'http://localhost:8990/',
target: 'http://localhost:3000',
/* target: 'http://knife4j.xiaominfo.com/', */
ws: true,
changeOrigin: true
}
}
},
configureWebpack: {
optimization: {
minimizer: [
new TerserPlugin({
terserOptions: {
ecma: undefined,
warnings: false,
parse: {},
compress: {
drop_console: true,
drop_debugger: true,
pure_funcs: ['console.log', 'console.debug', 'window.console.log', 'window.console.debug'] // 移除console
}
},
}),
]
},
plugins: [
new CompressionWebpackPlugin({
algorithm: "gzip",
test: new RegExp("\\.(" + productionGzipExtensions.join("|") + ")$"),
threshold: 10240,
minRatio: 0.8
}),
new CopyWebPackPlugin([
{ from: path.resolve(__dirname, 'public/oauth'), to: path.resolve(__dirname, 'dist/webjars/oauth') }
])
]
}
};
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/sk20020228/knife4j-vue.git
git@gitee.com:sk20020228/knife4j-vue.git
sk20020228
knife4j-vue
knife4j-vue
master

搜索帮助

0d507c66 1850385 C8b1a773 1850385