@unocss/vite 0.12.0 → 0.12.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/dist/index.js +5 -3
- package/dist/index.mjs +5 -3
- package/package.json +5 -5
package/dist/index.js
CHANGED
|
@@ -208,7 +208,12 @@ function GlobalModeBuildPlugin({ uno, extract, tokens, modules, filter }) {
|
|
|
208
208
|
if (layer)
|
|
209
209
|
return getLayerPlaceholder(layer);
|
|
210
210
|
},
|
|
211
|
+
configResolved(config) {
|
|
212
|
+
cssPlugin = config.plugins.find((i) => i.name === "vite:css-post");
|
|
213
|
+
},
|
|
211
214
|
async renderChunk(_, chunk) {
|
|
215
|
+
if (!cssPlugin)
|
|
216
|
+
return null;
|
|
212
217
|
const chunks = Object.keys(chunk.modules).filter((i) => modules.has(i));
|
|
213
218
|
if (!chunks.length)
|
|
214
219
|
return null;
|
|
@@ -236,9 +241,6 @@ function GlobalModeBuildPlugin({ uno, extract, tokens, modules, filter }) {
|
|
|
236
241
|
var _a;
|
|
237
242
|
return command === "build" && !((_a = options.build) == null ? void 0 : _a.ssr);
|
|
238
243
|
},
|
|
239
|
-
configResolved(config) {
|
|
240
|
-
cssPlugin = config.plugins.find((i) => i.name === "vite:css-post");
|
|
241
|
-
},
|
|
242
244
|
enforce: "post",
|
|
243
245
|
async generateBundle(_, bundle) {
|
|
244
246
|
const files = Object.keys(bundle);
|
package/dist/index.mjs
CHANGED
|
@@ -174,7 +174,12 @@ function GlobalModeBuildPlugin({ uno, extract, tokens, modules, filter }) {
|
|
|
174
174
|
if (layer)
|
|
175
175
|
return getLayerPlaceholder(layer);
|
|
176
176
|
},
|
|
177
|
+
configResolved(config) {
|
|
178
|
+
cssPlugin = config.plugins.find((i) => i.name === "vite:css-post");
|
|
179
|
+
},
|
|
177
180
|
async renderChunk(_, chunk) {
|
|
181
|
+
if (!cssPlugin)
|
|
182
|
+
return null;
|
|
178
183
|
const chunks = Object.keys(chunk.modules).filter((i) => modules.has(i));
|
|
179
184
|
if (!chunks.length)
|
|
180
185
|
return null;
|
|
@@ -202,9 +207,6 @@ function GlobalModeBuildPlugin({ uno, extract, tokens, modules, filter }) {
|
|
|
202
207
|
var _a;
|
|
203
208
|
return command === "build" && !((_a = options.build) == null ? void 0 : _a.ssr);
|
|
204
209
|
},
|
|
205
|
-
configResolved(config) {
|
|
206
|
-
cssPlugin = config.plugins.find((i) => i.name === "vite:css-post");
|
|
207
|
-
},
|
|
208
210
|
enforce: "post",
|
|
209
211
|
async generateBundle(_, bundle) {
|
|
210
212
|
const files = Object.keys(bundle);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@unocss/vite",
|
|
3
|
-
"version": "0.12.
|
|
3
|
+
"version": "0.12.1",
|
|
4
4
|
"description": "The Vite plugin for UnoCSS",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"unocss",
|
|
@@ -34,10 +34,10 @@
|
|
|
34
34
|
],
|
|
35
35
|
"dependencies": {
|
|
36
36
|
"@rollup/pluginutils": "^4.1.1",
|
|
37
|
-
"@unocss/config": "0.12.
|
|
38
|
-
"@unocss/core": "0.12.
|
|
39
|
-
"@unocss/scope": "0.12.
|
|
40
|
-
"@unocss/inspector": "0.12.
|
|
37
|
+
"@unocss/config": "0.12.1",
|
|
38
|
+
"@unocss/core": "0.12.1",
|
|
39
|
+
"@unocss/scope": "0.12.1",
|
|
40
|
+
"@unocss/inspector": "0.12.1"
|
|
41
41
|
},
|
|
42
42
|
"devDependencies": {
|
|
43
43
|
"vite": "^2.6.13"
|