-
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
ts_library with use_angular_plugin doesn't correctly build TSX files #2542
Comments
Sorry for the delay. I can see how this blocks your migration, but OTOH almost no one in the Angular community uses TSX so it's easy to see how this could be a bug in any number of layers. to isolate which layer it is, I think the first question is whether we can reproduce it outside of Bazel, like with a plain |
Actually there's pretty clearly a bug right here where we assume |
Thanks for the repro, I confirmed fixing that line makes your compile succeed using the linked PR |
Thanks for checking it out 😄 I agree it's a bit of a weird case, but I did manage to get things moving by patching that file manually. We ended up moving to |
🐞 bug report
Affected Rule
The issue is caused by the rule:
ts_library(use_angular_plugin=True)
, specifically theng_ts_library
wrapper provided in the example at https://github.com/bazelbuild/rules_nodejs/blob/master/examples/angular/tools/angular_ts_library.bzlIs this a regression?
No
Description
When you include a TSX file into a
ts_library
rule withuse_angular_plugin=True
, you get build errors like this:These errors do not occur if you have a
ng_ts_library
rule depend on ats_library
rule which contains the TSX files.We encounter this issue in our production code because we use both Angular and React and it blocks us from getting started with Bazel by making a rule which simply includes all of the files (we have tried other approaches, even generating BUILD rules per-file but due to other architectural issues this is very difficult).
🔬 Minimal Reproduction
https://github.com/jeshua-clipchamp/bazel-angular-react-example
🔥 Exception or Error
🌍 Your Environment
Operating System:
(although it happens on Mac/Linux too)
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: