mirror of
https://github.com/angular/angular-cli.git
synced 2025-05-18 20:02:40 +08:00
fix(@angular-devkit/build-angular): ignore css only chunks during naming
Don't name CSS only chunks. Closes #22769
This commit is contained in:
parent
a11c947c73
commit
e28c715972
@ -26,6 +26,12 @@ export class NamedChunksPlugin {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ([...chunk.files.values()].every((f) => f.endsWith('.css'))) {
|
||||||
|
// If all chunk files are CSS files skip.
|
||||||
|
// This happens when using `import('./styles.css')` in a lazy loaded module.
|
||||||
|
return undefined;
|
||||||
|
}
|
||||||
|
|
||||||
const name = this.generateName(chunk);
|
const name = this.generateName(chunk);
|
||||||
if (name) {
|
if (name) {
|
||||||
chunk.name = name;
|
chunk.name = name;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user