-
Notifications
You must be signed in to change notification settings - Fork 520
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
Can't use tsc output for js_library #3329
Comments
something is wrong with your package-a:
tsc isn't writing any files into the directory bazel expects. Add
Then to make the compilation of package-b succeed you'll also need to fixup the tsconfig.json with a pathMapping section that tells TypeScript where to resolve package-a. See the docs for that too. Maybe since your other issue about resolveJsonModule is fixed in the next release, you don't really want to use |
Isn't js_library supposed to help with this?
Yes, maybe. I'm only starting my journey with bazel and would like to know how things work. |
no, js_library doesn't help the typescript compiler resolve references from |
Got it, thanks |
🐞 bug report
Affected Rule
tsc
Is this a regression?
Not sure. Did not use bazel before
Description
js_library
works just fine for me when it depends on the output of ts_project.However, I can't achieve the same using tsc.
I.e. the below does not produce valid package when
dist
is atsc
rule, and works whendist
ists_project
🔬 Minimal Reproduction
https://github.com/cartmanez/bazel-ts-repo
In that repo /packages/package-b depends on /packages/package-a, /packages/package-d depends on /packages/package-c
🔥 Exception or Error
When dependent package is built with tsc, it is present in node_modules folder in sandbox, but it's dist folder is empty
🌍 Your Environment
Operating System:
Output of
bazel version
:Rules_nodejs version:
Anything else relevant?
Seems like no. Thank you in advance!
The text was updated successfully, but these errors were encountered: