Add server translation (#9847)
First proof of concept for server-side translation. The goal was to translate one metadata item: <img width="939" alt="Screenshot 2025-01-26 at 08 18 41" src="https://github.com/user-attachments/assets/e42a3f7f-f5e3-4ee7-9be5-272a2adccb23" />
This commit is contained in:
@ -1,6 +1,4 @@
|
||||
import { JestConfigWithTsJest } from 'ts-jest';
|
||||
|
||||
const jestConfig: JestConfigWithTsJest = {
|
||||
const jestConfig = {
|
||||
// to enable logs, comment out the following line
|
||||
silent: true,
|
||||
clearMocks: true,
|
||||
@ -10,7 +8,24 @@ const jestConfig: JestConfigWithTsJest = {
|
||||
transformIgnorePatterns: ['/node_modules/'],
|
||||
testRegex: '.*\\.spec\\.ts$',
|
||||
transform: {
|
||||
'^.+\\.(t|j)s$': 'ts-jest',
|
||||
'^.+\\.(t|j)s$': [
|
||||
'@swc/jest',
|
||||
{
|
||||
jsc: {
|
||||
parser: {
|
||||
syntax: 'typescript',
|
||||
tsx: false,
|
||||
decorators: true,
|
||||
},
|
||||
transform: {
|
||||
decoratorMetadata: true,
|
||||
},
|
||||
experimental: {
|
||||
plugins: [['@lingui/swc-plugin', {}]],
|
||||
},
|
||||
},
|
||||
},
|
||||
],
|
||||
},
|
||||
moduleNameMapper: {
|
||||
'^src/(.*)': '<rootDir>/src/$1',
|
||||
|
||||
Reference in New Issue
Block a user