mirror of
https://github.com/0xJacky/nginx-ui.git
synced 2025-05-12 10:55:51 +02:00
bug fix
This commit is contained in:
parent
ad421905a8
commit
dd6e19657a
162 changed files with 15071 additions and 932 deletions
65
frontend/vue.config.js
Normal file
65
frontend/vue.config.js
Normal file
|
@ -0,0 +1,65 @@
|
|||
const webpack = require('webpack')
|
||||
const {tuple} = require("ant-design-vue/lib/_util/type");
|
||||
|
||||
module.exports = {
|
||||
pages: {
|
||||
index: {
|
||||
// pages 的入口
|
||||
entry: 'src/main.js',
|
||||
// 模板来源
|
||||
template: 'public/index.html',
|
||||
// 在 dist/index.html 的输出
|
||||
filename: 'index.html',
|
||||
// 当使用 title 选项时,
|
||||
// template 中的 title 标签需要是 <title><%= htmlWebpackPlugin.options.title %></title>
|
||||
title: 'Nginx UI',
|
||||
// 在这个页面中包含的块,默认情况下会包含
|
||||
// 提取出来的通用 chunk 和 vendor chunk。
|
||||
chunks: ['chunk-vendors', 'chunk-common', 'index']
|
||||
},
|
||||
},
|
||||
devServer: {
|
||||
proxy: {
|
||||
'/ws': {
|
||||
target: 'wss://nginx.jackyu.cn/api',
|
||||
changeOrigin: true,
|
||||
pathRewrite: {
|
||||
'^/ws': '',
|
||||
},
|
||||
},
|
||||
'': {
|
||||
target: 'https://nginx.jackyu.cn/api',
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
productionSourceMap: false,
|
||||
|
||||
css: {
|
||||
loaderOptions: {
|
||||
css: {},
|
||||
postcss: {},
|
||||
less: {
|
||||
javascriptEnabled: true
|
||||
}
|
||||
},
|
||||
extract: false
|
||||
},
|
||||
|
||||
configureWebpack: config => {
|
||||
config.plugins.push(new webpack.IgnorePlugin(/^\.\/locale$/, /moment$/))
|
||||
if (process.env.NODE_ENV === 'production') {
|
||||
config.performance = {
|
||||
hints: 'warning',
|
||||
// 入口起点的最大体积
|
||||
maxEntrypointSize: 50000000,
|
||||
// 生成文件的最大体积
|
||||
maxAssetSize: 30000000,
|
||||
// 只给出 js 文件的性能提示
|
||||
assetFilter: function (assetFilename) {
|
||||
return assetFilename.endsWith('.js')
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue