Bug: third-party compiler, transpiler, swc backend should be resolved relative to tsconfig that declared it, not to the project · Issue #1662 · TypeStrong/ts-node · GitHub
You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Bug: "compiler", "transpiler", and overridden swc backend resolve relative to the project, not to the tsconfig that declared them. This means an extended, reusable tsconfig that bundles its own dependencies cannot reliably declare these options.
compiler and transpiler
Both are module specifiers in a tsconfig file. We try to resolve them as if the tsconfig was an executable script that had done require.resolve().
overridden swc backend
I doubt anyone's using this config, since I don't think it's documented, but you can technically use our built-in swc transpiler, but with a non-standard @swc/core backend.
This will attempt to require("third-party-swc-wrapper") instead of "@swc/core" or "@swc/wasm". You can also use this mechanism to force usage of "@swc/wasm" instead of "@swc/core", if your module graph has both on disk.
Same rules as above: we simulate if the tsconfig had been able to require.resolve() them.