Skip to content

Commit

Permalink
Add fileName to the webpack loader params, allowing users to identify… (
Browse files Browse the repository at this point in the history
#634)

Co-authored-by: mattcompiles <mattjones701@gmail.com>
  • Loading branch information
phil-lgr and mattcompiles authored Apr 13, 2022
1 parent 32f309f commit 69b8460
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
7 changes: 7 additions & 0 deletions .changeset/nervous-beans-destroy.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
'@vanilla-extract/webpack-plugin': patch
---

Add fileName to the CSS virtual loader params

This allows users to identify the source file for vanilla-extract css imports
1 change: 1 addition & 0 deletions packages/webpack-plugin/src/loader.ts
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@ export function pitch(this: LoaderContext) {
serializeVirtualCssPath: async ({ fileName, source }) => {
const serializedCss = await serializeCss(source);
const virtualResourceLoader = `${virtualLoader}?${JSON.stringify({
fileName: fileName,
source: serializedCss,
})}`;

Expand Down

0 comments on commit 69b8460

Please sign in to comment.