feat: add path mapping support to webpack_bundle - #214
Conversation
| bazel_dep(name = "aspect_rules_js", version = "3.2.1", dev_dependency = True) | ||
| bazel_dep(name = "bazel_skylib", version = "1.5.0", dev_dependency = True) | ||
|
|
||
| git_override( |
There was a problem hiding this comment.
Note to self that I need to delete these overrides and use a released rules_js version before merging this.
There was a problem hiding this comment.
What do we need to land in rules_js before tagging a release there? Overall I think this PR LGTM but I'd rather drop the git_overrides...
There was a problem hiding this comment.
All this PR needs is js_run_binary_action, and that has already landed on main in rules_js. So for the purpose of this PR we could tag a rules_js release now. I do still need to land at least one more change in rules_js to get path mapping working with js_run_binary, though, so I don't know if we want to wait for that or not.
There was a problem hiding this comment.
I'd vote to keep this PR open until we have tested js_run_binary_action more before tagging a release. Maybe also getting rules_ts working before tagging a rules_js release to make sure the API is good?
07a07b0 to
08952cf
Compare
Set the `supports-path-mapping` execution requirement on the Webpack action so that builds which differ only in compilation mode (e.g. -c fastbuild vs -c opt) can share a single cached action. Support is only advertised when none of the `env` values expand via location or Make variable expansion, since those can produce paths that aren't path mapped. Add an e2e test (e2e/path_mapping) that builds a webpack_bundle target under -c fastbuild then -c opt with a shared --disk_cache and asserts the second build's action is served from cache.
Set the
supports-path-mappingexecution requirement on the Webpack action so that builds which differ only in compilation mode (e.g. -c fastbuild vs -c opt) can share a single cached action. Support is only advertised when none of theenvvalues expand via location or Make variable expansion, since those can produce paths that aren't path mapped.Add an e2e test (e2e/path_mapping) that builds a webpack_bundle target under -c fastbuild then -c opt with a shared --disk_cache and asserts the second build's action is served from cache.
Changes are visible to end-users: yes
Add path mapping support to webpack_bundle.
Test plan