Add i18n support #5
@ -1,3 +0,0 @@
|
||||
{
|
||||
"plugins": ["@lingui/babel-plugin-lingui-macro"]
|
||||
}
|
||||
15
frontend/.swcrc
Normal file
15
frontend/.swcrc
Normal file
@ -0,0 +1,15 @@
|
||||
{
|
||||
"$schema": "https://swc.rs/schema.json",
|
||||
"jsc": {
|
||||
"experimental": {
|
||||
"plugins": [
|
||||
[
|
||||
"@lingui/swc-plugin",
|
||||
{
|
||||
// Additional Configuration
|
||||
}
|
||||
]
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -9,5 +9,4 @@ export default defineConfig({
|
||||
include: ["src"],
|
||||
},
|
||||
],
|
||||
compileNamespace: "ts",
|
||||
});
|
||||
2220
frontend/package-lock.json
generated
2220
frontend/package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@ -4,17 +4,15 @@
|
||||
"version": "0.0.0",
|
||||
"type": "module",
|
||||
"scripts": {
|
||||
"dev": "concurrently \"npm:dev:vite\" \"npm:i18n:watch\"",
|
||||
"dev:vite": "vite",
|
||||
"build": "lingui compile --typescript && tsc -b && vite build",
|
||||
"dev": "vite",
|
||||
"build": "tsc -b && vite build",
|
||||
"lint": "eslint .",
|
||||
"format": "prettier . --write",
|
||||
"update-api": "openapi-typescript http://localhost:8080/v3/api-docs --output src/lib/api.d.ts",
|
||||
"preview": "vite preview",
|
||||
"extract": "lingui extract",
|
||||
"extract-clean": "lingui extract --clean",
|
||||
"compile": "lingui compile --typescript",
|
||||
"i18n:watch": "lingui compile --typescript --watch"
|
||||
"compile": "lingui compile --typescript"
|
||||
|
stne3960 marked this conversation as resolved
Outdated
|
||||
},
|
||||
"dependencies": {
|
||||
"@lingui/react": "^5.3.0",
|
||||
@ -25,13 +23,12 @@
|
||||
},
|
||||
"devDependencies": {
|
||||
"@eslint/js": "^9.21.0",
|
||||
"@lingui/babel-plugin-lingui-macro": "^5.3.0",
|
||||
"@lingui/cli": "^5.3.0",
|
||||
"@lingui/swc-plugin": "^5.5.1",
|
||||
"@lingui/vite-plugin": "^5.3.0",
|
||||
"@types/react": "^19.0.10",
|
||||
"@types/react-dom": "^19.0.4",
|
||||
"@vitejs/plugin-react": "^4.3.4",
|
||||
"concurrently": "^9.1.2",
|
||||
"@vitejs/plugin-react-swc": "^3.8.0",
|
||||
"eslint": "^9.21.0",
|
||||
"eslint-config-prettier": "^10.1.1",
|
||||
"eslint-plugin-react-hooks": "^5.1.0",
|
||||
@ -42,5 +39,8 @@
|
||||
"typescript": "~5.7.2",
|
||||
"typescript-eslint": "^8.24.1",
|
||||
"vite": "^6.2.0"
|
||||
},
|
||||
"overrides": {
|
||||
"@swc/core": "1.3.56"
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,16 +1,11 @@
|
||||
import { defineConfig } from "vite";
|
||||
import react from "@vitejs/plugin-react";
|
||||
import react from "@vitejs/plugin-react-swc";
|
||||
import { lingui } from "@lingui/vite-plugin";
|
||||
|
||||
export default defineConfig({
|
||||
build: {
|
||||
target: "esnext",
|
||||
},
|
||||
plugins: [
|
||||
react({
|
||||
babel: {
|
||||
plugins: ["@lingui/babel-plugin-lingui-macro"],
|
||||
},
|
||||
plugins: [["@lingui/swc-plugin", {}]],
|
||||
}),
|
||||
lingui(),
|
||||
],
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user
Need instructions in the readme what these commands do and what the expected workflow is when adding/translating new content.