Skip to content

fix(@angular/build): prepend deploy-url to file loader output paths#32866

Closed
maruthang wants to merge 1 commit intoangular:mainfrom
maruthang:fix-32789-deploy-url-file-loader
Closed

fix(@angular/build): prepend deploy-url to file loader output paths#32866
maruthang wants to merge 1 commit intoangular:mainfrom
maruthang:fix-32789-deploy-url-file-loader

Conversation

@maruthang
Copy link
Copy Markdown
Contributor

PR Checklist

PR Type

  • Bugfix

What is the current behavior?

Assets processed by esbuild's file loader (e.g., SVGs imported via import svgUrl from './test.svg') do not get the deploy-url prefix applied. This is a regression from the webpack migration.

Issue Number: #32789

What is the new behavior?

Pass the publicPath option through to esbuild's common options so that file loader output paths are correctly prefixed with the deploy-url value (e.g., https://example.com/some/path/media/test.svg).

Does this PR introduce a breaking change?

  • Yes
  • No

Pass the publicPath option through to esbuild's common options so that
assets processed by the file loader (e.g., SVGs imported via URL) get
the deploy-url prefix applied, matching the previous webpack behavior.

Fixes angular#32789
@google-cla
Copy link
Copy Markdown

google-cla bot commented Mar 27, 2026

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

Copy link
Copy Markdown

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request adds support for prepending the deploy URL to file loader import URLs by passing the publicPath option to the esbuild configuration. A new test case was added to verify that deployUrl is correctly applied to assets handled by the file loader. I have no feedback to provide.

@maruthang maruthang deleted the fix-32789-deploy-url-file-loader branch March 27, 2026 17:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants