You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently the only straightforward way that I'm aware of to propagate variables (API URLs, etc) into builds is by using --define with the variable interpolation in the env attribute. --define is not recommended according to the Bazel docs:
--define is only supported for backwards compatibility. Prefer Starlark build settings whenever possible.
Describe the feature
webpack_bundle and webpack_devserver should have a env_settings or equivalent attribute that takes a settings label to env var map, like the old esbuild rule from rules_nodejs has:
I think this would require adding the same attribute to js_run_devserver, as webpack_devserver is a macro and so wouldn't have access to the flags during the loading phase.
Fund our work
Sponsor our open source work by donating a feature bounty
The text was updated successfully, but these errors were encountered:
What is the current behavior?
Currently the only straightforward way that I'm aware of to propagate variables (API URLs, etc) into builds is by using
--define
with the variable interpolation in theenv
attribute.--define
is not recommended according to the Bazel docs:Describe the feature
webpack_bundle
andwebpack_devserver
should have aenv_settings
or equivalent attribute that takes a settings label to env var map, like the oldesbuild
rule fromrules_nodejs
has:I think this would require adding the same attribute to
js_run_devserver
, aswebpack_devserver
is a macro and so wouldn't have access to the flags during the loading phase.Fund our work
The text was updated successfully, but these errors were encountered: