@vanilla-extract/vite-plugin 5.1.0-vite-inline-dev-css-20250617003237 → 5.1.0
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.
@@ -85,7 +85,8 @@ function vanillaExtractPlugin({
|
|
85
85
|
tag: 'style',
|
86
86
|
children: allCss,
|
87
87
|
attrs: {
|
88
|
-
type: 'text/css'
|
88
|
+
type: 'text/css',
|
89
|
+
'data-vanilla-extract-inline-dev-css': true
|
89
90
|
},
|
90
91
|
injectTo: 'head-prepend'
|
91
92
|
}];
|
@@ -158,7 +159,7 @@ function vanillaExtractPlugin({
|
|
158
159
|
var _compiler3;
|
159
160
|
return (_compiler3 = compiler$1) === null || _compiler3 === void 0 ? void 0 : _compiler3.close();
|
160
161
|
},
|
161
|
-
async transform(code, id) {
|
162
|
+
async transform(code, id, options = {}) {
|
162
163
|
const [validId] = id.split('?');
|
163
164
|
if (!integration.cssFileFilter.test(validId)) {
|
164
165
|
return null;
|
@@ -188,8 +189,8 @@ function vanillaExtractPlugin({
|
|
188
189
|
}
|
189
190
|
};
|
190
191
|
|
191
|
-
// We don't need to watch files in build mode
|
192
|
-
if (isBuild) {
|
192
|
+
// We don't need to watch files or invalidate modules in build mode or during SSR
|
193
|
+
if (isBuild || options.ssr) {
|
193
194
|
return result;
|
194
195
|
}
|
195
196
|
for (const file of watchFiles) {
|
@@ -85,7 +85,8 @@ function vanillaExtractPlugin({
|
|
85
85
|
tag: 'style',
|
86
86
|
children: allCss,
|
87
87
|
attrs: {
|
88
|
-
type: 'text/css'
|
88
|
+
type: 'text/css',
|
89
|
+
'data-vanilla-extract-inline-dev-css': true
|
89
90
|
},
|
90
91
|
injectTo: 'head-prepend'
|
91
92
|
}];
|
@@ -158,7 +159,7 @@ function vanillaExtractPlugin({
|
|
158
159
|
var _compiler3;
|
159
160
|
return (_compiler3 = compiler$1) === null || _compiler3 === void 0 ? void 0 : _compiler3.close();
|
160
161
|
},
|
161
|
-
async transform(code, id) {
|
162
|
+
async transform(code, id, options = {}) {
|
162
163
|
const [validId] = id.split('?');
|
163
164
|
if (!integration.cssFileFilter.test(validId)) {
|
164
165
|
return null;
|
@@ -188,8 +189,8 @@ function vanillaExtractPlugin({
|
|
188
189
|
}
|
189
190
|
};
|
190
191
|
|
191
|
-
// We don't need to watch files in build mode
|
192
|
-
if (isBuild) {
|
192
|
+
// We don't need to watch files or invalidate modules in build mode or during SSR
|
193
|
+
if (isBuild || options.ssr) {
|
193
194
|
return result;
|
194
195
|
}
|
195
196
|
for (const file of watchFiles) {
|
@@ -77,7 +77,8 @@ function vanillaExtractPlugin({
|
|
77
77
|
tag: 'style',
|
78
78
|
children: allCss,
|
79
79
|
attrs: {
|
80
|
-
type: 'text/css'
|
80
|
+
type: 'text/css',
|
81
|
+
'data-vanilla-extract-inline-dev-css': true
|
81
82
|
},
|
82
83
|
injectTo: 'head-prepend'
|
83
84
|
}];
|
@@ -150,7 +151,7 @@ function vanillaExtractPlugin({
|
|
150
151
|
var _compiler3;
|
151
152
|
return (_compiler3 = compiler) === null || _compiler3 === void 0 ? void 0 : _compiler3.close();
|
152
153
|
},
|
153
|
-
async transform(code, id) {
|
154
|
+
async transform(code, id, options = {}) {
|
154
155
|
const [validId] = id.split('?');
|
155
156
|
if (!cssFileFilter.test(validId)) {
|
156
157
|
return null;
|
@@ -180,8 +181,8 @@ function vanillaExtractPlugin({
|
|
180
181
|
}
|
181
182
|
};
|
182
183
|
|
183
|
-
// We don't need to watch files in build mode
|
184
|
-
if (isBuild) {
|
184
|
+
// We don't need to watch files or invalidate modules in build mode or during SSR
|
185
|
+
if (isBuild || options.ssr) {
|
185
186
|
return result;
|
186
187
|
}
|
187
188
|
for (const file of watchFiles) {
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@vanilla-extract/vite-plugin",
|
3
|
-
"version": "5.1.0
|
3
|
+
"version": "5.1.0",
|
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",
|
@@ -16,7 +16,7 @@
|
|
16
16
|
"author": "SEEK",
|
17
17
|
"license": "MIT",
|
18
18
|
"dependencies": {
|
19
|
-
"@vanilla-extract/compiler": "^0.3.0
|
19
|
+
"@vanilla-extract/compiler": "^0.3.0",
|
20
20
|
"@vanilla-extract/integration": "^8.0.4"
|
21
21
|
},
|
22
22
|
"devDependencies": {
|