feat: 更新环境配置,添加项目名称和依赖版本,优化vite配置
This commit is contained in:
parent
d5d08a56db
commit
f3b05e8ab3
@ -12,3 +12,4 @@ VITE_WS_URL = ws://192.168.0.222:14080/ws
|
||||
VITE_PORT = 5174
|
||||
VITE_INSPECTION_TYPE = "inspection"
|
||||
VITE_MINIO_URL = "http://192.168.28.10:9000/cmvr-iot/"
|
||||
PROJECT_NAME=aima
|
||||
@ -15,3 +15,4 @@ VITE_API_URL = http://192.168.28.10:13080
|
||||
VITE_WS_URL = ws://192.168.0.201:13080/ws
|
||||
VITE_INSPECTION_TYPE = "inspection"
|
||||
VITE_MINIO_URL = "http://192.168.28.10:9000/cmvr-iot/"
|
||||
PROJECT_NAME=aima
|
||||
|
||||
@ -14,7 +14,7 @@
|
||||
"preview": "vite preview"
|
||||
},
|
||||
"dependencies": {
|
||||
"@cmvr/iot-common": "1.0.0",
|
||||
"@cmvr/iot-common": "1.0.4",
|
||||
"@element-plus/icons-vue": "2.3.2",
|
||||
"@vue-flow/background": "^1.3.2",
|
||||
"@vue-flow/controls": "^1.1.3",
|
||||
|
||||
12
pnpm-lock.yaml
generated
12
pnpm-lock.yaml
generated
@ -12,8 +12,8 @@ importers:
|
||||
.:
|
||||
dependencies:
|
||||
'@cmvr/iot-common':
|
||||
specifier: 1.0.0
|
||||
version: 1.0.0(@element-plus/icons-vue@2.3.2(vue@3.5.26))(core-js@3.49.0)(element-plus@2.13.1(vue@3.5.26))(pinia@3.0.4(vue@3.5.26))(vue-router@4.6.4(vue@3.5.26))(vue@3.5.26)
|
||||
specifier: 1.0.4
|
||||
version: 1.0.4(@element-plus/icons-vue@2.3.2(vue@3.5.26))(core-js@3.49.0)(element-plus@2.13.1(vue@3.5.26))(pinia@3.0.4(vue@3.5.26))(vue-router@4.6.4(vue@3.5.26))(vue@3.5.26)
|
||||
'@element-plus/icons-vue':
|
||||
specifier: 2.3.2
|
||||
version: 2.3.2(vue@3.5.26)
|
||||
@ -185,8 +185,8 @@ packages:
|
||||
'@bufbuild/protobuf@2.13.0':
|
||||
resolution: {integrity: sha512-acq7c49vxfm1ggJ95P70TX7ABDM0vxr1SYD3BB0o0jnBLB4OAqeHyKuN+cD3w80gXEDQ2zxHpR6CUeA+O/aU9g==}
|
||||
|
||||
'@cmvr/iot-common@1.0.0':
|
||||
resolution: {integrity: sha512-EIdZdRRgyhb4FfclQ6SoDT3NwIAY/7uI2re+zcwwcnc0a0ELKizTn4POFZt/O4mhr5Ikeg8J98cRB/cchV3E9g==}
|
||||
'@cmvr/iot-common@1.0.4':
|
||||
resolution: {integrity: sha512-KVaOVHqQCwecGv4zQ6GzPybva87RWHdNEDyVbiT3u7tk2envJkCAMqr+8UMapWAUmW4n5xQuV0t1MlObhjYtrA==}
|
||||
peerDependencies:
|
||||
'@element-plus/icons-vue': ^2.3.2
|
||||
element-plus: ^2.13.1
|
||||
@ -2978,7 +2978,7 @@ snapshots:
|
||||
|
||||
'@bufbuild/protobuf@2.13.0': {}
|
||||
|
||||
'@cmvr/iot-common@1.0.0(@element-plus/icons-vue@2.3.2(vue@3.5.26))(core-js@3.49.0)(element-plus@2.13.1(vue@3.5.26))(pinia@3.0.4(vue@3.5.26))(vue-router@4.6.4(vue@3.5.26))(vue@3.5.26)':
|
||||
'@cmvr/iot-common@1.0.4(@element-plus/icons-vue@2.3.2(vue@3.5.26))(core-js@3.49.0)(element-plus@2.13.1(vue@3.5.26))(pinia@3.0.4(vue@3.5.26))(vue-router@4.6.4(vue@3.5.26))(vue@3.5.26)':
|
||||
dependencies:
|
||||
'@element-plus/icons-vue': 2.3.2(vue@3.5.26)
|
||||
'@vue-flow/background': 1.3.2(@vue-flow/core@1.48.2(vue@3.5.26))(vue@3.5.26)
|
||||
@ -3006,6 +3006,8 @@ snapshots:
|
||||
pinia: 3.0.4(vue@3.5.26)
|
||||
sortablejs: 1.15.7
|
||||
splitpanes: 3.1.5
|
||||
three: 0.181.2
|
||||
urdf-loader: 0.12.7(three@0.181.2)
|
||||
uuid: 11.1.1
|
||||
vue: 3.5.26
|
||||
vue-cropper: 1.1.1
|
||||
|
||||
@ -39,7 +39,8 @@ export default defineConfig(({ mode, command }) => {
|
||||
// 设置路径
|
||||
'~': path.resolve(__dirname, './'),
|
||||
// 设置别名
|
||||
'@': path.resolve(__dirname, './src')
|
||||
'@': path.resolve(__dirname, './src'),
|
||||
'@cmvr/iot-common': path.resolve(__dirname, '../cmvr-iot-common/dist')
|
||||
},
|
||||
dedupe: ['vue', 'vue-router', 'pinia', 'element-plus', '@element-plus/icons-vue'],
|
||||
// https://cn.vitejs.dev/config/#resolve-extensions
|
||||
@ -107,6 +108,10 @@ export default defineConfig(({ mode, command }) => {
|
||||
additionalData: `@use "${variablePath}" as *;`
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
define: {
|
||||
// 将环境变量注入到全局常量中
|
||||
'__PROJECT_NAME__': JSON.stringify(env.PROJECT_NAME || 'changan'),
|
||||
},
|
||||
}
|
||||
})
|
||||
|
||||
Loading…
Reference in New Issue
Block a user