test : ci/cd
This commit is contained in:
@@ -20,6 +20,7 @@
|
|||||||
"jquery": "^3.6.0",
|
"jquery": "^3.6.0",
|
||||||
"js-cookie": "^3.0.5",
|
"js-cookie": "^3.0.5",
|
||||||
"nprogress": "^0.2.0",
|
"nprogress": "^0.2.0",
|
||||||
|
"package-manager-detector": "^1.3.0",
|
||||||
"pinia": "^2.0.35",
|
"pinia": "^2.0.35",
|
||||||
"sass": "^1.62.1",
|
"sass": "^1.62.1",
|
||||||
"scss": "^0.2.4",
|
"scss": "^0.2.4",
|
||||||
|
|||||||
191
vite.config.js
191
vite.config.js
@@ -10,101 +10,104 @@ import vueJsx from '@vitejs/plugin-vue-jsx'
|
|||||||
import Inspect from 'vite-plugin-inspect'
|
import Inspect from 'vite-plugin-inspect'
|
||||||
import viteSvgIcons from 'vite-plugin-svg-icons'
|
import viteSvgIcons from 'vite-plugin-svg-icons'
|
||||||
import path from 'path'
|
import path from 'path'
|
||||||
|
|
||||||
// https://vitejs.dev/config/
|
// https://vitejs.dev/config/
|
||||||
export default defineConfig({
|
export default defineConfig(async () => {
|
||||||
plugins: [
|
const {default: packageManagerDetector} = await import('package-manager-detector');
|
||||||
vue(),
|
// 使用 packageManagerDetector
|
||||||
vueJsx(),
|
return {
|
||||||
AutoImport({
|
plugins: [
|
||||||
//自动导入vue相关函数
|
vue(),
|
||||||
imports: ['vue', 'vue-router'],
|
vueJsx(),
|
||||||
resolvers: [
|
AutoImport({
|
||||||
ElementPlusResolver(),
|
//自动导入vue相关函数
|
||||||
//自动导入图标组件
|
imports: ['vue', 'vue-router'],
|
||||||
IconsResolver({
|
resolvers: [
|
||||||
prefix: 'Icon',
|
ElementPlusResolver(),
|
||||||
}),
|
//自动导入图标组件
|
||||||
],
|
IconsResolver({
|
||||||
}),
|
prefix: 'Icon',
|
||||||
Components({
|
}),
|
||||||
dirs: ['src/components', 'src/fvcomponents'],
|
],
|
||||||
resolvers: [
|
}),
|
||||||
// 自动注册图标组件
|
Components({
|
||||||
IconsResolver({
|
dirs: ['src/components', 'src/fvcomponents'],
|
||||||
enabledRequirements: ['ep'],
|
resolvers: [
|
||||||
}),
|
// 自动注册图标组件
|
||||||
//自动导入组件
|
IconsResolver({
|
||||||
ElementPlusResolver()
|
enabledRequirements: ['ep'],
|
||||||
],
|
}),
|
||||||
}),
|
//自动导入组件
|
||||||
Icons({
|
ElementPlusResolver()
|
||||||
autoInstall: true,
|
],
|
||||||
}),
|
}),
|
||||||
viteSvgIcons({
|
Icons({
|
||||||
// 指定需要缓存的图标文件夹
|
autoInstall: true,
|
||||||
iconDirs: [path.resolve(__dirname, 'src/assets/svg')],
|
}),
|
||||||
// 指定symbolId格式
|
viteSvgIcons({
|
||||||
symbolId: 'icon-[dir]-[name]',
|
// 指定需要缓存的图标文件夹
|
||||||
}),
|
iconDirs: [path.resolve(__dirname, 'src/assets/svg')],
|
||||||
Inspect(),
|
// 指定symbolId格式
|
||||||
],
|
symbolId: 'icon-[dir]-[name]',
|
||||||
resolve: {
|
}),
|
||||||
alias: {
|
Inspect(),
|
||||||
'@': fileURLToPath(new URL('./src', import.meta.url))
|
],
|
||||||
}
|
resolve: {
|
||||||
},
|
alias: {
|
||||||
|
'@': fileURLToPath(new URL('./src', import.meta.url))
|
||||||
build: {
|
|
||||||
minify: 'esbuild',
|
|
||||||
terserOptions: {
|
|
||||||
compress: {
|
|
||||||
drop_console: false, // 生产环境移除log
|
|
||||||
drop_debugger: true // 生产环境禁用debugger
|
|
||||||
}
|
}
|
||||||
}
|
},
|
||||||
},
|
|
||||||
server: {
|
|
||||||
host: '0.0.0.0',
|
|
||||||
port: 8888,
|
|
||||||
strictPort: false,
|
|
||||||
open: true,
|
|
||||||
proxy: {
|
|
||||||
// '/api/workflow': {
|
|
||||||
// target: 'http://frp.feashow.cn:31800/',
|
|
||||||
// // target: 'http://clay.frp.feashow.cn/',
|
|
||||||
// // target: 'http://192.168.31.175:8000',
|
|
||||||
// changeOrigin: true,
|
|
||||||
// rewrite: (path) => path.replace(/^\/api/, '')
|
|
||||||
// },
|
|
||||||
// '/api/admin': {
|
|
||||||
// target: 'http://frp.feashow.cn:31800/',
|
|
||||||
// // target: 'http://clay.frp.feashow.cn/',
|
|
||||||
// // target: 'http://192.168.31.175:8000',
|
|
||||||
// changeOrigin: true,
|
|
||||||
// rewrite: (path) => path.replace(/^\/api/, '')
|
|
||||||
// },
|
|
||||||
// '/api/auth': {
|
|
||||||
// target: 'http://frp.feashow.cn:31800/',
|
|
||||||
// // target: 'http://clay.frp.feashow.cn/',
|
|
||||||
// // target: 'http://192.168.31.175:8000',
|
|
||||||
// changeOrigin: true,
|
|
||||||
// rewrite: (path) => path.replace(/^\/api/, '')
|
|
||||||
// },
|
|
||||||
'/api': {
|
|
||||||
target: 'http://mosr.feashow.cn',
|
|
||||||
// target: 'http://kyglweb.scgzjy.com:8080/',
|
|
||||||
// target: 'http://clay.frp.feashow.cn/',
|
|
||||||
// target: 'http://10.7.127.57:8000',
|
|
||||||
changeOrigin: true,
|
|
||||||
// rewrite: (path) => path.replace(/^\/api/, '')
|
|
||||||
},
|
|
||||||
// '/api/notice-ws': {
|
|
||||||
// target: 'ws://mosr.feashow.cn/summary/notice-ws',
|
|
||||||
// ws: true,
|
|
||||||
// changeOrigin: true,
|
|
||||||
// }
|
|
||||||
}
|
|
||||||
},
|
|
||||||
|
|
||||||
|
build: {
|
||||||
|
minify: 'esbuild',
|
||||||
|
terserOptions: {
|
||||||
|
compress: {
|
||||||
|
drop_console: false, // 生产环境移除log
|
||||||
|
drop_debugger: true // 生产环境禁用debugger
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
server: {
|
||||||
|
host: '0.0.0.0',
|
||||||
|
port: 8888,
|
||||||
|
strictPort: false,
|
||||||
|
open: true,
|
||||||
|
proxy: {
|
||||||
|
// '/api/workflow': {
|
||||||
|
// target: 'http://frp.feashow.cn:31800/',
|
||||||
|
// // target: 'http://clay.frp.feashow.cn/',
|
||||||
|
// // target: 'http://192.168.31.175:8000',
|
||||||
|
// changeOrigin: true,
|
||||||
|
// rewrite: (path) => path.replace(/^\/api/, '')
|
||||||
|
// },
|
||||||
|
// '/api/admin': {
|
||||||
|
// target: 'http://frp.feashow.cn:31800/',
|
||||||
|
// // target: 'http://clay.frp.feashow.cn/',
|
||||||
|
// // target: 'http://192.168.31.175:8000',
|
||||||
|
// changeOrigin: true,
|
||||||
|
// rewrite: (path) => path.replace(/^\/api/, '')
|
||||||
|
// },
|
||||||
|
// '/api/auth': {
|
||||||
|
// target: 'http://frp.feashow.cn:31800/',
|
||||||
|
// // target: 'http://clay.frp.feashow.cn/',
|
||||||
|
// // target: 'http://192.168.31.175:8000',
|
||||||
|
// changeOrigin: true,
|
||||||
|
// rewrite: (path) => path.replace(/^\/api/, '')
|
||||||
|
// },
|
||||||
|
'/api': {
|
||||||
|
target: 'http://mosr.feashow.cn',
|
||||||
|
// target: 'http://kyglweb.scgzjy.com:8080/',
|
||||||
|
// target: 'http://clay.frp.feashow.cn/',
|
||||||
|
// target: 'http://10.7.127.57:8000',
|
||||||
|
changeOrigin: true,
|
||||||
|
// rewrite: (path) => path.replace(/^\/api/, '')
|
||||||
|
},
|
||||||
|
// '/api/notice-ws': {
|
||||||
|
// target: 'ws://mosr.feashow.cn/summary/notice-ws',
|
||||||
|
// ws: true,
|
||||||
|
// changeOrigin: true,
|
||||||
|
// }
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
}
|
||||||
})
|
})
|
||||||
|
|||||||
Reference in New Issue
Block a user