Skip to content

Commit 69b8460

Browse files
Add fileName to the webpack loader params, allowing users to identify… (#634)
Co-authored-by: mattcompiles <[email protected]>
1 parent 32f309f commit 69b8460

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
---
2+
'@vanilla-extract/webpack-plugin': patch
3+
---
4+
5+
Add fileName to the CSS virtual loader params
6+
7+
This allows users to identify the source file for vanilla-extract css imports

packages/webpack-plugin/src/loader.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,7 @@ export function pitch(this: LoaderContext) {
8383
serializeVirtualCssPath: async ({ fileName, source }) => {
8484
const serializedCss = await serializeCss(source);
8585
const virtualResourceLoader = `${virtualLoader}?${JSON.stringify({
86+
fileName: fileName,
8687
source: serializedCss,
8788
})}`;
8889

0 commit comments

Comments
 (0)