mirror of
https://github.com/0xJacky/nginx-ui.git
synced 2025-05-11 18:35:51 +02:00
unfinished WebUI
This commit is contained in:
parent
0ad1b3af4b
commit
070b34be8a
69 changed files with 13932 additions and 140 deletions
53
nginx-ui-frontend/vue.config.js
Normal file
53
nginx-ui-frontend/vue.config.js
Normal file
|
@ -0,0 +1,53 @@
|
|||
const webpack = require('webpack')
|
||||
|
||||
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: 'http://localhost:9000'
|
||||
},
|
||||
|
||||
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