1 Star 0 Fork 734

九哥哥/springboot-openai-chatgpt

Create your Gitee Account
Explore and code with more than 14 million developers,Free private repositories !:)
Sign up
文件
Clone or Download
vue.config.js 2.12 KB
Copy Edit Raw Blame History
Chen927-cz authored 2024-04-26 10:18 +08:00 . 代码修改
const CompressionWebpackPlugin = require('compression-webpack-plugin')
const TerserPlugin = require('terser-webpack-plugin')
const MonacoWebpackPlugin = require('monaco-editor-webpack-plugin')
let optimization = {}
let css = {}
if (process.env.NODE_ENV === 'production') {
optimization.minimize = true
optimization.minimizer = [new TerserPlugin({
parallel: true,
sourceMap: true,
terserOptions: {
warnings: false,
compress: {
drop_console: true, // 注释console
drop_debugger: true, // 注释debugger
pure_funcs: ["console.log"]
}
}
})]
css.extract = {
ignoreOrder: true
}
}
module.exports = {
publicPath: "/",
lintOnSave: true,
productionSourceMap: false,
chainWebpack: (config) => {
//忽略的打包文件
config.externals({
'vue': 'Vue',
'vue-router': 'VueRouter',
'vuex': 'Vuex',
'axios': 'axios',
'element-ui': 'ELEMENT',
})
const entry = config.entry('app')
entry
.add('babel-polyfill')
.end()
entry
.add('classlist-polyfill')
.end()
entry
.add('@/mock')
.end()
},
css,
configureWebpack: {
optimization,
plugins: [
new CompressionWebpackPlugin({
// 正在匹配需要压缩的文件后缀
test: /.(js|css|svg|woff|ttf|json|html)$/,
// 大于10kb的会压缩
threshold: 10240
// 其余配置查看compression-webpack-plugin
}),
new MonacoWebpackPlugin(),
]
},
devServer: {
// 端口配置
port: 1888,
// 反向代理配置
proxy: {
'/api': {
//本地服务接口地址
target: 'http://127.0.0.1:9872',
ws: true,
pathRewrite: {
'^/api': '/'
}
}
},
disableHostCheck: true
}
}
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Java
1
https://gitee.com/jiugege1106/springboot-openai-chatgpt.git
git@gitee.com:jiugege1106/springboot-openai-chatgpt.git
jiugege1106
springboot-openai-chatgpt
springboot-openai-chatgpt
master

Search