Skip to content

Commit

Permalink
Merge branch 'master' into fix-699
Browse files Browse the repository at this point in the history
  • Loading branch information
mattcompiles authored Jun 3, 2022
2 parents d363ec5 + 162b66f commit 64e07de
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/cold-phones-deny.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@vanilla-extract/vite-plugin": patch
---

Fix styles not updating in dev mode
3 changes: 2 additions & 1 deletion packages/vite-plugin/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,8 @@ export function vanillaExtractPlugin({ identifiers }: Options = {}): Plugin {

if (server && cssMap.has(id) && cssMap.get(id) !== source) {
const { moduleGraph } = server;
const module = moduleGraph.getModuleById(id);
const moduleId = normalizePath(path.join(config.root, id));
const module = moduleGraph.getModuleById(moduleId);

if (module) {
moduleGraph.invalidateModule(module);
Expand Down

0 comments on commit 64e07de

Please sign in to comment.