Skip to content

Commit 099e477

Browse files
committed
fix(@angular/build): avoid hashing development external component stylesheets
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)
1 parent 2bcff88 commit 099e477

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

packages/angular/build/src/tools/esbuild/angular/component-stylesheets.ts

+2
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ export class ComponentStylesheetBundler {
4848
);
4949

5050
buildOptions.entryPoints = { [externalId]: entry };
51+
buildOptions.entryNames = '[name]';
5152
delete buildOptions.publicPath;
5253
} else {
5354
buildOptions.entryPoints = [entry];
@@ -88,6 +89,7 @@ export class ComponentStylesheetBundler {
8889
});
8990
if (externalId) {
9091
buildOptions.entryPoints = { [externalId]: `${namespace};${entry}` };
92+
buildOptions.entryNames = '[name]';
9193
delete buildOptions.publicPath;
9294
} else {
9395
buildOptions.entryPoints = [`${namespace};${entry}`];

0 commit comments

Comments
 (0)