-
Notifications
You must be signed in to change notification settings - Fork 522
New issue
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
esbuild can't resolve workspace absolute imports #2474
Comments
I think it's the use of the |
Yeah this is If we want to support this mode, then somewhere in here we could add a mapping in to the generated jsconfig: |
I was having the same problem. I renamed all my imports and removed the workspace name, but then I had errors in So I'd say it would need to be supported :/ As I was looking at the config, I was also wondering about generated files. Once I have a different computer I'll be able to try, but should |
🐞 bug report
Affected Rules
ts_library
esbuild
Is this a regression?
No.
Description
I may be configuring something wrong, but
esbuild
can't seem to find transitivets_library
dependencies within the workspace.🔬 Minimal Reproduction
I have a minimal reproduction at https://github.com/shosti/bazel-rulesjs-repro. There's a top-level
ts_library
(:a
) that includeslib/b.ts
as a dependency (imported as"myworkspace/lib/b"
). Runningbazel build //:a
succeeds, which indicates that the import paths are correct as far astsc
is concerned.There's also an
esbuild
bundle (:bundle
) that depends on:a
. Runningbazel build //:bundle
fails with an import error message.🔥 Exception or Error
🌍 Your Environment
Operating System:
Output of
bazel version
:Rules_nodejs version:
(Please check that you have matching versions between WORKSPACE file and
@bazel/*
npm packages.)Anything else relevant?
The text was updated successfully, but these errors were encountered: