@vanilla-extract/vite-plugin 3.3.0 → 3.3.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -639,7 +639,7 @@ export const themeB = createTheme(vars, {
639
639
  });
640
640
  ```
641
641
 
642
- > 💡 All theme variants must provide a value for every variable or it’s a type error.
642
+ > 💡 All theme values must be provided or it’s a type error.
643
643
 
644
644
  ### createGlobalTheme
645
645
 
@@ -662,7 +662,7 @@ export const vars = createGlobalTheme(':root', {
662
662
  });
663
663
  ```
664
664
 
665
- > 💡 All theme variants must provide a value for every variable or it’s a type error.
665
+ > 💡 All theme values must be provided or it’s a type error.
666
666
 
667
667
  If you want to implement an existing theme contract, you can pass it as the second argument.
668
668
 
@@ -857,7 +857,7 @@ export const exampleStyle = style({
857
857
  });
858
858
  ```
859
859
 
860
- Scoped variables can be set via the `vars` property on style objects.
860
+ Scoped variables can be set using the `vars` key.
861
861
 
862
862
  ```ts
863
863
  import { createVar, style } from '@vanilla-extract/css';
@@ -160,9 +160,11 @@ function vanillaExtractPlugin({
160
160
 
161
161
  inject(${JSON.stringify(css)});
162
162
 
163
- import.meta.hot.on('${styleUpdateEvent(validId)}', (css) => {
164
- inject(css);
165
- });
163
+ if (import.meta.hot) {
164
+ import.meta.hot.on('${styleUpdateEvent(validId)}', (css) => {
165
+ inject(css);
166
+ });
167
+ }
166
168
  `;
167
169
  },
168
170
 
@@ -160,9 +160,11 @@ function vanillaExtractPlugin({
160
160
 
161
161
  inject(${JSON.stringify(css)});
162
162
 
163
- import.meta.hot.on('${styleUpdateEvent(validId)}', (css) => {
164
- inject(css);
165
- });
163
+ if (import.meta.hot) {
164
+ import.meta.hot.on('${styleUpdateEvent(validId)}', (css) => {
165
+ inject(css);
166
+ });
167
+ }
166
168
  `;
167
169
  },
168
170
 
@@ -133,9 +133,11 @@ function vanillaExtractPlugin({
133
133
 
134
134
  inject(${JSON.stringify(css)});
135
135
 
136
- import.meta.hot.on('${styleUpdateEvent(validId)}', (css) => {
137
- inject(css);
138
- });
136
+ if (import.meta.hot) {
137
+ import.meta.hot.on('${styleUpdateEvent(validId)}', (css) => {
138
+ inject(css);
139
+ });
140
+ }
139
141
  `;
140
142
  },
141
143
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vanilla-extract/vite-plugin",
3
- "version": "3.3.0",
3
+ "version": "3.3.1",
4
4
  "description": "Zero-runtime Stylesheets-in-TypeScript",
5
5
  "main": "dist/vanilla-extract-vite-plugin.cjs.js",
6
6
  "module": "dist/vanilla-extract-vite-plugin.esm.js",