fix: monorepo typing

This commit is contained in:
Simon
2025-12-16 01:30:40 +08:00
parent 9351948794
commit 54eb50f7be
3 changed files with 18 additions and 6 deletions

View File

@@ -7,10 +7,16 @@
"baseUrl": ".", "baseUrl": ".",
"outDir": "dist", "outDir": "dist",
"paths": { "paths": {
"@page-agent/page-controller": ["../page-controller/src/PageController.ts"] //
"@page-agent/page-controller": ["../page-controller/src/PageController.ts"],
"@page-agent/ui": ["../ui/src/index.ts"]
} }
}, },
"include": ["**/*.ts"], "include": ["**/*.ts"],
"exclude": ["dist", "node_modules"], "exclude": ["dist", "node_modules"],
"references": [{ "path": "../page-controller" }] "references": [
//
{ "path": "../page-controller" },
{ "path": "../ui" }
]
} }

View File

@@ -4,8 +4,8 @@ import { useHashLocation } from 'wouter/use-hash-location'
import './i18n/config' import './i18n/config'
import './i18n/types' import './i18n/types'
import { default as PagesRouter } from './router.tsx' import { default as PagesRouter } from './router'
import { default as TestPagesRouter } from './test-pages/router.tsx' import { default as TestPagesRouter } from './test-pages/router'
import './index.css' import './index.css'

View File

@@ -11,11 +11,17 @@
"@/*": ["src/*"], "@/*": ["src/*"],
// Simplified monorepo solution (raw npm workspace with hoisting) // Simplified monorepo solution (raw npm workspace with hoisting)
"page-agent": ["../page-agent/src/PageAgent.ts"],
"@page-agent/page-controller": ["../page-controller/src/PageController.ts"], "@page-agent/page-controller": ["../page-controller/src/PageController.ts"],
"page-agent": ["../page-agent/src/PageAgent.ts"] "@page-agent/ui": ["../ui/src/index.ts"]
} }
}, },
"include": ["**/*.ts", "**/*.tsx"], "include": ["**/*.ts", "**/*.tsx"],
"exclude": ["dist", "node_modules"], "exclude": ["dist", "node_modules"],
"references": [{ "path": "../page-controller" }, { "path": "../page-agent" }] "references": [
//
{ "path": "../page-agent" },
{ "path": "../page-controller" },
{ "path": "../ui" }
]
} }