-
-
Notifications
You must be signed in to change notification settings - Fork 27
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
esbuild_config macro #9
Comments
Hi @alexeagle. I'm trying to early adopt these esbuild rules and I'm facing an issue with not found dependencies (esbuild plugins). To emulate the config from the previous
Reference it in the application BUILD file:
And esbuild bundle crashes with:
This setup worked well with thre previous esbuild rules.. Am I missing something? |
Hi @danigar that's exciting to see such bleeding edge usage already :) Your plugin usage there depends on the "dynamic linker" in rules_nodejs, so that your call to In the meantime if you'd like to make this work, then you just need to make a custom esbuild binary that has all your plugins "statically linked", which is to say, in the
and then pass that to the I'll add an example to the repo so it's more clear, and also gives us the spot to update when rules_js is ready. |
#11 is that example, however it's not working yet... |
Thank you for the clarification, Alex. I will keep an eye on this and use esbuild from rules_nodejs in the meantime. |
To be clear, we are reviewing the rules_js fixes right now so it's quite possible we'll have #11 merged this week. If you're okay staying on bleeding edge, we're happy to have a bit of good feedback from adoption. |
Sure. Happy to help giving feedback 👍 |
The svg plugin is working now in #11 |
There is still a TODO for this rules_esbuild/esbuild/private/esbuild.bzl Line 163 in c12ccae
|
I can't tell if this is actually still needed, or if writing a config file like /examples/plugin shows is easy enough that we can just drop the |
Yeah I was going to comment that we should include that macro here
https://github.com/bazelbuild/rules_nodejs/blob/stable/packages/esbuild/test/plugins/BUILD.bazel#L21-L37
The text was updated successfully, but these errors were encountered: