-
Notifications
You must be signed in to change notification settings - Fork 523
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 get angular to work with protobuf #2373
Comments
It turns out if I import pb with relative path it works well. e.g.
The full path used to work but now it doesn't. |
The linked change shows a bump to rules_nodejs > 2.0.0, this version included a change to not link the root of the workspace. iirc rollups default behavior is to treat unresolvable modules as external, which is then what is happening here. It's possible to add |
Confirmed that adding I'm curious, shouldn't such problem cause the build of |
This issue has been automatically marked as stale because it has not had any activity for 90 days. It will be closed if no further activity occurs in two weeks. Collaborators can add a "cleanup" or "need: discussion" label to keep it open indefinitely. Thanks for your contributions to rules_nodejs! |
This issue was automatically closed because it went two weeks without a reply since it was labeled "Can Close?" |
🐞 bug report
Affected Rule
The issue is presented the rule:
rollup_bundle
but it occurs when multiple rules combine to support angular and protobuf so it's hard to say the problem is isolated in a single rule.Is this a regression?
Yes, this bug was not present before this change where various rules and dependencies were upgraded.
Description
When an angular(10.0.0) app depends on protobuf ts library as demo'ed in this PR, the
import
statement of proto is not resolved byrollup_bundle
.🔬 Minimal Reproduction
Checkout the branch(https://github.com/jiaqi/angular-on-java/tree/proto) of the demo PR, build with
bazel build webapp/aoj:js_bundle
.Open the result file
less bazel-bin/webapp/aoj/js_bundle/index.js
The first line is
import { Thing } from 'angular_on_java/webapp/aoj/app/thing_pb';
If I understand it right, the import statements should all be resolved at this point.
🔥 Exception or Error
The build can pass but with
--define=VERBOSE_LOGS=1
, we can see the warning showing that the proto ts library is not resolved....
🌍 Your Environment
Operating System:
macOS 10.15.7
Output of
bazel version
:bazel 3.7.1-homebrew
Rules_nodejs version:
2.3.2
Anything else relevant?
I'm using rules_nodejs 2.3.2 in this project. I haven't got 3.0.0 to work. Combining 3.0.0 with protobuf gave me a lot more trouble so I stopped trying. If that's the way to go I will file separate issue but let's keep the focus of this issue on rule_nodejs 2.3.* and protobuf. Thanks.
The text was updated successfully, but these errors were encountered: