diff --git a/tests/project-contract.test.mjs b/tests/project-contract.test.mjs index 7ce5f84..195dc8d 100644 --- a/tests/project-contract.test.mjs +++ b/tests/project-contract.test.mjs @@ -19,6 +19,10 @@ test('overseas PDA is an independent Vue 3 app with separate packaging identity' assert.match(vite, /replace\(\/\^\\\/overseas-api\//) assert.match(vite, /removeHeader\('origin'\)/) assert.match(vite, /removeHeader\('referer'\)/) + assert.match(vite, /__VUE_I18N_FULL_INSTALL__:\s*true/) + assert.match(vite, /__VUE_I18N_LEGACY_API__:\s*false/) + assert.match(vite, /__VUE_I18N_PROD_DEVTOOLS__:\s*false/) + assert.match(vite, /__INTLIFY_PROD_DEVTOOLS__:\s*false/) assert.match(styles, /home-operation-grid[^}]*grid-template-columns:\s*repeat\(3/) assert.match(styles, /home-operation[^}]*width:\s*100%/) assert.doesNotMatch(styles, /home-operation-primary[^}]*grid-column:\s*1\s*\/\s*-1/) diff --git a/vite.config.js b/vite.config.js index 2781ecb..7ee2f8a 100644 --- a/vite.config.js +++ b/vite.config.js @@ -29,6 +29,12 @@ export default defineConfig(({ mode }) => { const overseasTarget = env.OVERSEAS_API_PROXY_TARGET || 'http://127.0.0.1:9300' return { plugins: [uni()], + define: { + __VUE_I18N_FULL_INSTALL__: true, + __VUE_I18N_LEGACY_API__: false, + __VUE_I18N_PROD_DEVTOOLS__: false, + __INTLIFY_PROD_DEVTOOLS__: false + }, server: { proxy: { '/api': loggedProxy('auth', { target: domesticTarget, changeOrigin: true }),