-
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
Include non-JS assets in esbuild bundles #2553
Comments
I think this is partly covered by #2545, but it should handle pulling through the data dependencies |
|
Is there a way to do this for a more general use case? I have a json file that is generated at build time, and I want it included as part of the ts_library outputs, and it's not entirely obvious to me how to do that. the naive approach of wrapping the ts_library in a filegroup doesn't seem to work, because ts_library's output is a struct with a number of expected attributes on it. |
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?" |
🚀 feature request
Relevant Rules
esbuild
ts_library
Description
esbuild has the ability to load non-JavaScript assets such as CSS and binary files. It would be awesome if this were exposed to Bazel (if it is currently possible, I can't figure out a way).
Describe the solution you'd like
Probably the most intuitive way would be to include assets in the
srcs
ordata
section ofts_library
. So if you had amain.tsx
file that looked like:with related CSS in
index.css
, the relevant rules could be something like:(This setup currently produces an error like
Could not resolve "./index.css"
.)Describe alternatives you've considered
The only alternative I know of is to have CSS/other assets completely separate from the bundling pipeline, which seems less than ideal.
The text was updated successfully, but these errors were encountered: