pnpm install
pnpm run reset
pnpm run hijack
Afterwards, inspect SvelteKit's internal tsconfig.json
Expected & actual output:
{
"paths": {
"$myAlias": ["../src/myAlias"],
"$myAlias/*": ["../src/myAlias/*"],
"$lib": ["../src/lib"],
"$lib/*": ["../src/lib/*"]
},
"rootDirs": ["..", "./types"]
}
package.json
.Afterwards, again inspect SvelteKit's internal tsconfig.json
Actual (unexpected) output:
{
"paths": {
"$myAlias": ["../../z-another-app/src/myAlias"],
"$myAlias/*": ["../../z-another-app/src/myAlias/*"],
"$lib": ["../src/lib"],
"$lib/*": ["../src/lib/*"]
},
"rootDirs": ["../../z-another-app", "./types"]
}
SvelteKit's Vite is configured with an extra plugin that logs process.cwd()
and server.config.root
.
During reset
/hijack
, check STDOUT for [cwd-vs-config-root] ...
lines.
Logs during reset
:
[cwd-vs-config-root] PROCESS CWD: /path-to-repo/packages/my-app
[cwd-vs-config-root] CONFIG ROOT: /path-to-repo/packages/my-app
Logs during hijack
:
[cwd-vs-config-root] process.cwd: /path-to-repo/packages/z-another-app
[cwd-vs-config-root] config.root: /path-to-repo/packages/my-app