-
Notifications
You must be signed in to change notification settings - Fork 524
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
example/protocol_buffers should use ts_project #2381
Comments
I think I found the problem. ts_library by default creates UMD modules in devmode, which isn't compatible with Webpack (or at least not without fancy footwork that's beyond my understanding). Telling it to make es2015 modules makes Webpack happy. PR incoming. |
could we back up a step? you say
I don't think this is true - we'd like to deprecate |
#2301, for one, in which it says I'd need to run tsc directly to compile an "opaque" directory of ts files (which confused be, since I thought the proto libraries would be declaring their outputs). Using ts_library seemed a lot easier than that. |
And yes, an update to example/protocol_buffers that shows how to use ts_project would be helpful if ts_library isn't the way to go. |
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 was done in 5f26d0f, but has since been removed. Closing as won't fix. |
🚀 feature request
Description
example/react_webpack shows how to build a react app using ts_project and webpack. It should also show how to build a react app using ts_library and webpack, as it is my understanding that ts_library is the best way to go if I'm to use dynamically-generated TS files (like protobuf definitions).
I've made an attempt at converting example/app to use ts_library. You can find it here: simmonmt@c2f1fdb
It compiles and bundles properly, but when I load it in the browser (i.e.
bazel run :server
), I get this error:If you can help me to figure out what went wrong here, I'd be happy to submit a PR that adds ts_library to example/react_webpack, thus resolving this issue.
The text was updated successfully, but these errors were encountered: