Skip to content

Commit

Permalink
fix(@angular/build): avoid hashing development external component sty…
Browse files Browse the repository at this point in the history
…lesheets

When using the development server with a production configuration or with bundle
hashing enabled, the external stylesheet files used by the development server for
hot replacement of component styles are no longer hashed. This ensures that the
requests from the runtime served by the development server match the available
generated component stylesheet files.

(cherry picked from commit 31f9037)
  • Loading branch information
clydin committed Oct 24, 2024
1 parent 2bcff88 commit 099e477
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ export class ComponentStylesheetBundler {
);

buildOptions.entryPoints = { [externalId]: entry };
buildOptions.entryNames = '[name]';
delete buildOptions.publicPath;
} else {
buildOptions.entryPoints = [entry];
Expand Down Expand Up @@ -88,6 +89,7 @@ export class ComponentStylesheetBundler {
});
if (externalId) {
buildOptions.entryPoints = { [externalId]: `${namespace};${entry}` };
buildOptions.entryNames = '[name]';
delete buildOptions.publicPath;
} else {
buildOptions.entryPoints = [`${namespace};${entry}`];
Expand Down

0 comments on commit 099e477

Please sign in to comment.