From 28be0c322b0cb1c93c7f512c3ab54f2030a9018c Mon Sep 17 00:00:00 2001 From: Sibin Grasic Date: Tue, 18 Jun 2024 02:57:23 +0200 Subject: [PATCH] fix: Fixed chunk name --- lib/services/compile-config.service.ts | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/lib/services/compile-config.service.ts b/lib/services/compile-config.service.ts index 0f20002..b2a2f21 100644 --- a/lib/services/compile-config.service.ts +++ b/lib/services/compile-config.service.ts @@ -136,7 +136,7 @@ export class CompileConfig { plugins: [ new MiniCssExtractPlugin({ filename: ({ chunk }: PathData) => - this.cssName(chunk?.id?.toString(), bundle, cfg, '[id]'), + this.cssName(chunk?.name, bundle, cfg), }), new CssUrlRelativePlugin(), ], @@ -157,10 +157,9 @@ export class CompileConfig { chunkId: string | undefined, { name, entry }: BundleConfig, cfg: WordPackConfig, - fname: string = '[name]', ): string { const dir = Object.keys(entry).includes(chunkId || '') ? name : 'vendor'; - return `${cfg.styles('dist')}/${dir}/${fname}.css`; + return `${cfg.styles('dist')}/${dir}/[name].css`; } }