Skip to content

Commit 02ea735

Browse files
authored
fix(vite-plugin): return css in production (#729)
* fix(vite-plugin): return css in production * chore: add changeset
1 parent d9d0e44 commit 02ea735

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

.changeset/fuzzy-flowers-fold.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@vanilla-extract/vite-plugin': patch
3+
---
4+
5+
Generate CSS and not HMR code if vite server is present in production mode

packages/vite-plugin/src/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ export function vanillaExtractPlugin({
9696
return;
9797
}
9898

99-
if (!server) {
99+
if (!server || server.config.isProduction) {
100100
return css;
101101
}
102102

0 commit comments

Comments
 (0)