i18n
This commit is contained in:
+8
-1
@@ -2,6 +2,7 @@ import { tanstackStart } from '@tanstack/react-start/plugin/vite'
|
||||
import { defineConfig } from 'vite'
|
||||
import tsConfigPaths from 'vite-tsconfig-paths'
|
||||
import react from '@vitejs/plugin-react';
|
||||
import { lingui } from '@lingui/vite-plugin';
|
||||
|
||||
export default defineConfig(({ mode }) => ({
|
||||
server: {
|
||||
@@ -18,9 +19,15 @@ export default defineConfig(({ mode }) => ({
|
||||
tanstackStart({
|
||||
srcDirectory: 'src/app',
|
||||
}),
|
||||
lingui(),
|
||||
react({
|
||||
babel: {
|
||||
plugins: ['babel-plugin-react-compiler'],
|
||||
plugins: [
|
||||
// lingui must run before react-compiler: the compiler's memoization
|
||||
// rewrites JSX in ways the macro can no longer transform
|
||||
'@lingui/babel-plugin-lingui-macro',
|
||||
'babel-plugin-react-compiler',
|
||||
],
|
||||
},
|
||||
}),
|
||||
]
|
||||
|
||||
Reference in New Issue
Block a user