Compare commits

..
3 Commits
Author SHA1 Message Date
539943419 82d9531c25 ... 2024-07-29 15:20:30 +08:00
539943419 ad8260b87e app上路径直接写死 2024-07-29 15:06:07 +08:00
539943419 4b9599ef8a fix 2024-07-29 15:00:05 +08:00
2 changed files with 46 additions and 43 deletions

No files matched your search

+6 -4
View File
@@ -33,10 +33,11 @@ if (activeKeyMap == null) {
const serverPort = const serverPort =
process.env.NODE_ENV === 'development' ? config.PORT : location.port process.env.NODE_ENV === 'development' ? config.PORT : location.port
const baseUrl = const baseUrl = 'http://110.238.117.95:17057/'
location.protocol + '//' + location.hostname + ':' + serverPort + '/' // location.protocol + '//' + location.hostname + ':' + serverPort + '/'
const wsBaseUrl = 'ws' + '://' + location.hostname + ':' + serverPort // const wsBaseUrl = 'ws' + '://' + location.hostname + ':' + serverPort
const wsBaseUrl = 'ws://110.238.117.95:17057/'
// console.log(process.env.NODE_ENV,config.DEVPORT,location.port,serverPort) // console.log(process.env.NODE_ENV,config.DEVPORT,location.port,serverPort)
export const useSettingStore = defineStore('setting', { export const useSettingStore = defineStore('setting', {
@@ -48,7 +49,8 @@ export const useSettingStore = defineStore('setting', {
token, token,
userID, userID,
userGroup, userGroup,
baseUrl baseUrl,
wsBaseUrl
}), }),
getters: { getters: {
// double: state => state.count * 2 // double: state => state.count * 2
+40 -39
View File
@@ -6,42 +6,43 @@ import vue from "@vitejs/plugin-vue";
// https://vitejs.dev/config/ // https://vitejs.dev/config/
export default defineConfig({ export default defineConfig({
plugins: [ plugins: [
vue(), vue(),
visualizer({ visualizer({
open: true, open: true,
filename: "visualizer.html" //分析图生成的文件名 filename: 'visualizer.html' //分析图生成的文件名
}) })
], ],
resolve: { resolve: {
alias: { alias: {
"@": fileURLToPath(new URL("./src", import.meta.url)) '@': fileURLToPath(new URL('./src', import.meta.url))
} }
}, },
server: { server: {
// host:'0.0.0.0', // host:'0.0.0.0',
port: "17058", port: '17058',
open: true open: true
}, },
esbuild: { esbuild: {
drop: ["console", "debugger"] drop: ['console', 'debugger']
}, },
build: { build: {
minify: true, minify: true,
rollupOptions: { rollupOptions: {
output: { output: {
// 打包输出的配置 // 打包输出的配置
manualChunks: id => { manualChunks: (id) => {
// 这个ID,就是所有文件的绝对路径 // 这个ID,就是所有文件的绝对路径
if (id.includes("node_modules")) { if (id.includes('node_modules')) {
// 因为 node_modules 中的依赖通常是不会改变的 // 因为 node_modules 中的依赖通常是不会改变的
// 所以直接单独打包出去 // 所以直接单独打包出去
// 这个return 的值就是打包的名称 // 这个return 的值就是打包的名称
// return id.split('node_modules')[1] // return id.split('node_modules')[1]
return "modules"; return 'modules'
} }
} }
} }
} }
} },
}); base: './'
})