优化提交预检、废卡按钮置灰与等待超时提示
This commit is contained in:
@@ -2,6 +2,7 @@ import { resolve } from 'path'
|
||||
import { readFileSync } from 'fs'
|
||||
import { defineConfig, externalizeDepsPlugin } from 'electron-vite'
|
||||
import vue from '@vitejs/plugin-vue'
|
||||
import VueI18nPlugin from '@intlify/unplugin-vue-i18n/vite'
|
||||
|
||||
const pkg = JSON.parse(readFileSync(resolve('package.json'), 'utf-8')) as { version: string }
|
||||
|
||||
@@ -25,6 +26,14 @@ export default defineConfig({
|
||||
define: {
|
||||
__APP_VERSION__: JSON.stringify(pkg.version)
|
||||
},
|
||||
plugins: [vue()]
|
||||
plugins: [
|
||||
vue(),
|
||||
// 构建时预编译多语言消息 + 使用 vue-i18n runtime 构建,
|
||||
// 避免运行时 new Function() 编译消息(会被 CSP script-src 'self' 拦截导致白屏)
|
||||
VueI18nPlugin({
|
||||
include: [resolve('src/renderer/src/i18n/locales/**')],
|
||||
runtimeOnly: true
|
||||
})
|
||||
]
|
||||
}
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user