We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
When configuring tsconfig.json with paths:
tsconfig.json
paths
{ "compilerOptions": { "baseUrl": "./", "paths": [ "@fancyModules/*": ["./src/modules/fancyModule/*"] ] } }
the transpiler/loader used by threads wouldn't resolve these imports:
threads
import { Thing } from "@fanceModules/things"
and thus lead to "module not found" errors.
Although this works perfectly when running the same code with ts-node / tsx.
ts-node
tsx
Do not use custom paths imports in any module that are directly or indirectly imported by a worker. Instead use relative imports for workers.
Is there any change to get support for paths into threads?
The text was updated successfully, but these errors were encountered:
At least for a production build this package helps rewriting the imports: https://github.com/benyap/resolve-tspaths
However that still doesn't resolve the issue for dev builds using ts-node / tsx.
Sorry, something went wrong.
No branches or pull requests
Problem
When configuring
tsconfig.json
withpaths
:the transpiler/loader used by
threads
wouldn't resolve these imports:and thus lead to "module not found" errors.
Although this works perfectly when running the same code with
ts-node
/tsx
.Workaround
Do not use custom
paths
imports in any module that are directly or indirectly imported by a worker. Instead use relative imports for workers.Related documentation
Possible support for
threads
?Is there any change to get support for
paths
intothreads
?The text was updated successfully, but these errors were encountered: