Skip to content

Commit bff97e0

Browse files
JPriskJoe Priskleosvelperez
authored
feat(rspack): add support for cssFilename config #32498 (#32506)
## Current Behavior Passing cssFilename does not change the outputted css bundle ## Expected Behavior Specifying cssFilename in the rspack.config will be honoured by @nx/rspack ## Related Issue(s) #32498 Co-authored-by: Joe Prisk <joe.prisk@elmosoftware.com.au> Co-authored-by: Leosvel Pérez Espinosa <leosvel.perez.espinosa@gmail.com>
1 parent 029df7a commit bff97e0

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

packages/rspack/src/plugins/utils/apply-web-config.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -300,7 +300,11 @@ export function applyWebConfig(
300300
plugins.push(
301301
// extract global css from js files into own css file
302302
new CssExtractRspackPlugin({
303-
filename: `[name]${hashFormat.extract}.css`,
303+
filename:
304+
config.output?.cssFilename ??
305+
(options.outputHashing
306+
? `[name]${hashFormat.extract}.css`
307+
: '[name].css'),
304308
})
305309
);
306310
}

0 commit comments

Comments
 (0)