Skip to content

Commit 2131348

Browse files
committed
chore: dev-demo takes @adminforth/i18n from the local plugin sources, so i18n-static runs on the local I18nBase AdminForth/2005
1 parent b8936dc commit 2131348

1 file changed

Lines changed: 12 additions & 1 deletion

File tree

‎dev-demo/tsconfig.json‎

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,18 @@
44
"module": "nodenext",
55
"esModuleInterop": true,
66
"forceConsistentCasingInFileNames": true,
7-
"strict": true
7+
"strict": true,
8+
// Why: dev-demo takes every plugin from ../plugins, so local changes show up at once.
9+
// i18n-static is the only plugin which needs another plugin at runtime: it does
10+
// `import { I18nBase } from "@adminforth/i18n"`, and without this line that import would load
11+
// the npm copy of i18n from plugins/adminforth-i18n-static/node_modules, not the local one.
12+
// What: tsx follows "paths", so here the import goes to the local i18n sources instead.
13+
// For the record: this comes from the architecture decision done in (AdminForth/1609)
14+
// to build i18n-static on I18nBase shared from the i18n plugin.
15+
// probably there might be better re-architect approach to move both to common part
16+
"paths": {
17+
"@adminforth/i18n": ["../plugins/adminforth-i18n/index.ts"]
18+
}
819
},
920
"exclude": ["node_modules", "dist"]
1021
}

0 commit comments

Comments
 (0)