Some checks failed
verify / booking-verify (push) Has been cancelled
补齐C1正文资料交付和C2配额分类规则,完善Proposal人工任务、固定图片过滤及邮件附件展示。 修正失败终态与恢复上限,增加关闭状态的通知组件,永久保留处理历史并完善筛选分页。 同步相关页面修复、迁移、测试和项目记录。 验证:后台复用同源码clean verify结果1155通过/10条件跳过;前端262项及生产构建通过;敏感资料和提交路径检查通过。
55 lines
1.7 KiB
TypeScript
55 lines
1.7 KiB
TypeScript
import { fileURLToPath, URL } from 'node:url'
|
|
import { createRequire } from 'node:module'
|
|
import { dirname } from 'node:path'
|
|
|
|
import vue from '@vitejs/plugin-vue'
|
|
import { defineConfig, loadEnv, searchForWorkspaceRoot } from 'vite'
|
|
|
|
const require = createRequire(import.meta.url)
|
|
|
|
export default defineConfig(({ mode }) => {
|
|
const fileEnv = loadEnv(mode, process.cwd(), '')
|
|
const configuredEnv = { ...fileEnv, ...process.env }
|
|
const fixtureBuildEnabled = mode === 'test' || (
|
|
mode !== 'production'
|
|
&& configuredEnv.VITE_EMPLOYEE_WORKBENCH_USE_DEMO_FIXTURES === 'true'
|
|
)
|
|
const fixtureModule = fixtureBuildEnabled
|
|
? './src/features/employee-workbench/fixtures/employeeDemoFixtures.ts'
|
|
: './src/features/employee-workbench/fixtures/employeeDemoFixtures.disabled.ts'
|
|
|
|
return {
|
|
plugins: [vue()],
|
|
define: {
|
|
__EMPLOYEE_DEMO_FIXTURE_MODULE_INCLUDED__: JSON.stringify(fixtureBuildEnabled),
|
|
},
|
|
resolve: {
|
|
alias: [
|
|
{
|
|
find: /^@\/features\/employee-workbench\/fixtures\/employeeDemoFixtures$/,
|
|
replacement: fileURLToPath(new URL(fixtureModule, import.meta.url)),
|
|
},
|
|
{
|
|
find: '@',
|
|
replacement: fileURLToPath(new URL('./src', import.meta.url)),
|
|
},
|
|
],
|
|
},
|
|
server: {
|
|
host: '127.0.0.1',
|
|
port: 5178,
|
|
fs: {
|
|
allow: [searchForWorkspaceRoot(process.cwd()), dirname(require.resolve('primeicons/package.json'))],
|
|
},
|
|
proxy: configuredEnv.VITE_API_PROXY_TARGET
|
|
? {
|
|
'/api': {
|
|
target: configuredEnv.VITE_API_PROXY_TARGET,
|
|
changeOrigin: true,
|
|
},
|
|
}
|
|
: undefined,
|
|
},
|
|
}
|
|
})
|