@unocss/vite 0.33.2 → 0.33.4

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.cjs CHANGED
@@ -221,7 +221,6 @@ function GlobalModeBuildPlugin({ uno, ready, extract, tokens, modules, filter, g
221
221
  enforce: "pre",
222
222
  buildStart() {
223
223
  tasks = [];
224
- vfsLayerMap.clear();
225
224
  },
226
225
  transform(code, id) {
227
226
  if (filter(code, id))
@@ -285,6 +284,11 @@ function GlobalModeBuildPlugin({ uno, ready, extract, tokens, modules, filter, g
285
284
  },
286
285
  enforce: "post",
287
286
  async generateBundle(_, bundle) {
287
+ if (!vfsLayerMap.size) {
288
+ const msg = "[unocss] entry module not found, have you add `import 'uno.css'` in your main entry?";
289
+ this.warn(msg);
290
+ return;
291
+ }
288
292
  const files = Object.keys(bundle);
289
293
  const cssFiles = files.filter((i) => i.endsWith(".css"));
290
294
  if (!cssFiles.length)
package/dist/index.mjs CHANGED
@@ -211,7 +211,6 @@ function GlobalModeBuildPlugin({ uno, ready, extract, tokens, modules, filter, g
211
211
  enforce: "pre",
212
212
  buildStart() {
213
213
  tasks = [];
214
- vfsLayerMap.clear();
215
214
  },
216
215
  transform(code, id) {
217
216
  if (filter(code, id))
@@ -275,6 +274,11 @@ function GlobalModeBuildPlugin({ uno, ready, extract, tokens, modules, filter, g
275
274
  },
276
275
  enforce: "post",
277
276
  async generateBundle(_, bundle) {
277
+ if (!vfsLayerMap.size) {
278
+ const msg = "[unocss] entry module not found, have you add `import 'uno.css'` in your main entry?";
279
+ this.warn(msg);
280
+ return;
281
+ }
278
282
  const files = Object.keys(bundle);
279
283
  const cssFiles = files.filter((i) => i.endsWith(".css"));
280
284
  if (!cssFiles.length)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@unocss/vite",
3
- "version": "0.33.2",
3
+ "version": "0.33.4",
4
4
  "description": "The Vite plugin for UnoCSS",
5
5
  "keywords": [
6
6
  "unocss",
@@ -43,16 +43,16 @@
43
43
  },
44
44
  "dependencies": {
45
45
  "@rollup/pluginutils": "^4.2.1",
46
- "@unocss/config": "0.33.2",
47
- "@unocss/core": "0.33.2",
48
- "@unocss/inspector": "0.33.2",
49
- "@unocss/scope": "0.33.2",
50
- "@unocss/transformer-directives": "0.33.2",
51
- "magic-string": "^0.26.1"
46
+ "@unocss/config": "0.33.4",
47
+ "@unocss/core": "0.33.4",
48
+ "@unocss/inspector": "0.33.4",
49
+ "@unocss/scope": "0.33.4",
50
+ "@unocss/transformer-directives": "0.33.4",
51
+ "magic-string": "^0.26.2"
52
52
  },
53
53
  "devDependencies": {
54
- "@unocss/shared-integration": "0.33.2",
55
- "vite": "^2.9.8"
54
+ "@unocss/shared-integration": "0.33.4",
55
+ "vite": "^2.9.9"
56
56
  },
57
57
  "scripts": {
58
58
  "build": "unbuild",