Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
82d9531c25 | ||
|
|
ad8260b87e | ||
|
|
4b9599ef8a |
No files matched your search
+6
-4
@@ -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
|
||||||
|
|||||||
+10
-9
@@ -10,38 +10,39 @@ export default defineConfig({
|
|||||||
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: './'
|
||||||
|
})
|
||||||
Reference in new issue
Block a user