mirror of
https://github.com/OpenListTeam/OpenList-Frontend.git
synced 2026-03-13 11:20:24 +00:00
feat: copy i18n entry file
This commit is contained in:
@@ -3,6 +3,7 @@
|
||||
"version": "0.0.0",
|
||||
"description": "",
|
||||
"scripts": {
|
||||
"i18n": "node ./scripts/i18n.mjs",
|
||||
"start": "vite",
|
||||
"dev": "vite",
|
||||
"build": "vite build",
|
||||
|
||||
11
scripts/i18n.mjs
Normal file
11
scripts/i18n.mjs
Normal file
@@ -0,0 +1,11 @@
|
||||
import fs from "fs";
|
||||
import path from "path";
|
||||
|
||||
const root = "./src/lang";
|
||||
const entry = "entry.ts";
|
||||
const langs = fs.readdirSync(root);
|
||||
langs
|
||||
.filter((lang) => lang !== "en")
|
||||
.forEach((lang) => {
|
||||
fs.copyFileSync(path.join(root, "en", entry), path.join(root, lang, entry));
|
||||
});
|
||||
@@ -10,7 +10,7 @@
|
||||
"jsxImportSource": "solid-js",
|
||||
"types": ["vite/client"],
|
||||
"noEmit": true,
|
||||
"isolatedModules": true,
|
||||
"isolatedModules": false,
|
||||
"paths": {
|
||||
"~/*":["./src/*"],
|
||||
"@solidjs/router": ["./solid-router/src/index.tsx"],
|
||||
|
||||
Reference in New Issue
Block a user