diff --git a/frontend/vite.config.js b/frontend/vite.config.js index 2cec03f..5d5ed63 100644 --- a/frontend/vite.config.js +++ b/frontend/vite.config.js @@ -3,6 +3,22 @@ import react from '@vitejs/plugin-react'; // https://vitejs.dev/config/ export default defineConfig({ plugins: [react()], + optimizeDeps: { + // Pre-bundle startup locale modules before Wails starts proxying the WebView. + include: [ + 'antd/locale/de_DE', + 'antd/locale/en_US', + 'antd/locale/ja_JP', + 'antd/locale/ru_RU', + 'antd/locale/zh_CN', + 'antd/locale/zh_TW', + 'dayjs/locale/de', + 'dayjs/locale/ja', + 'dayjs/locale/ru', + 'dayjs/locale/zh-cn', + 'dayjs/locale/zh-tw', + ], + }, server: { host: '127.0.0.1', port: 5173, diff --git a/frontend/vite.config.ts b/frontend/vite.config.ts index 3c783cc..db1c836 100644 --- a/frontend/vite.config.ts +++ b/frontend/vite.config.ts @@ -4,6 +4,22 @@ import react from '@vitejs/plugin-react' // https://vitejs.dev/config/ export default defineConfig({ plugins: [react()], + optimizeDeps: { + // Pre-bundle startup locale modules before Wails starts proxying the WebView. + include: [ + 'antd/locale/de_DE', + 'antd/locale/en_US', + 'antd/locale/ja_JP', + 'antd/locale/ru_RU', + 'antd/locale/zh_CN', + 'antd/locale/zh_TW', + 'dayjs/locale/de', + 'dayjs/locale/ja', + 'dayjs/locale/ru', + 'dayjs/locale/zh-cn', + 'dayjs/locale/zh-tw', + ], + }, server: { host: '127.0.0.1', port: 5173,