Skip to content

feat: add path mapping support to webpack_bundle - #214

Merged
jbedard merged 8 commits into
aspect-build:mainfrom
acozzette:path-mapping
Aug 7, 2026
Merged

feat: add path mapping support to webpack_bundle#214
jbedard merged 8 commits into
aspect-build:mainfrom
acozzette:path-mapping

Conversation

@acozzette

Copy link
Copy Markdown
Contributor

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.


Changes are visible to end-users: yes

  • Searched for relevant documentation and updated as needed: yes
  • Breaking change (forces users to change their own code or config): no
  • Suggested release notes appear below: yes

Add path mapping support to webpack_bundle.

Test plan

  • Covered by existing test cases
  • New test cases added

Comment thread e2e/loaders/MODULE.bazel Outdated
@acozzette
acozzette force-pushed the path-mapping branch 3 times, most recently from 07a07b0 to 08952cf Compare July 30, 2026 22:57
@acozzette
acozzette marked this pull request as ready for review July 31, 2026 21:46
@acozzette
acozzette requested a review from jbedard July 31, 2026 21:47
Comment thread .github/workflows/ci-workflows.yaml Outdated
Comment thread webpack/private/webpack_bundle.bzl
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.
@jbedard
jbedard merged commit c2ec09c into aspect-build:main Aug 7, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants