Set up localization with feature flag control (#9649)
Refers #8128 Changes Introduced: - Added i18n configuration. - Added a feature flag for localization. - Enabled language switching based on the flag. --------- Co-authored-by: Félix Malfait <felix@twenty.com>
This commit is contained in:
committed by
GitHub
parent
b81ffcc77c
commit
f44b31573a
@ -1,4 +1,5 @@
|
||||
/* eslint-disable no-console */
|
||||
import { lingui } from '@lingui/vite-plugin';
|
||||
import { isNonEmptyString } from '@sniptt/guards';
|
||||
import react from '@vitejs/plugin-react-swc';
|
||||
import wyw from '@wyw-in-js/vite';
|
||||
@ -93,11 +94,17 @@ export default defineConfig(({ command, mode }) => {
|
||||
},
|
||||
|
||||
plugins: [
|
||||
react({ jsxImportSource: '@emotion/react' }),
|
||||
react({
|
||||
jsxImportSource: '@emotion/react',
|
||||
plugins: [['@lingui/swc-plugin', {}]],
|
||||
}),
|
||||
tsconfigPaths({
|
||||
projects: ['tsconfig.json', '../twenty-ui/tsconfig.json'],
|
||||
}),
|
||||
svgr(),
|
||||
lingui({
|
||||
configPath: path.resolve(__dirname, './lingui.config.ts'),
|
||||
}),
|
||||
checker(checkers),
|
||||
// TODO: fix this, we have to restrict the include to only the components that are using linaria
|
||||
// Otherwise the build will fail because wyw tries to include emotion styled components
|
||||
|
||||
Reference in New Issue
Block a user