@unocss/vite 0.26.1 → 0.26.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
@@ -366,7 +366,7 @@ function GlobalModeDevPlugin({ uno, tokens, onInvalidate, extract, filter }) {
366
366
  return code.replace("return hot", "hot.send = (data) => socket.send(data);return hot;");
367
367
  if (entries.has(getPath(id)) && code.includes("import.meta.hot")) {
368
368
  const snippet = `
369
- if (import.meta.hot) { try { import.meta.hot.send('${WS_EVENT_PREFIX}${lastServed}') } catch {} }`;
369
+ if (import.meta.hot) { try { import.meta.hot.send('${WS_EVENT_PREFIX}${lastServed}') } catch (e) { console.warn('[unocss-hmr]', e) } }`;
370
370
  return code + snippet;
371
371
  }
372
372
  }
package/dist/index.mjs CHANGED
@@ -358,7 +358,7 @@ function GlobalModeDevPlugin({ uno, tokens, onInvalidate, extract, filter }) {
358
358
  return code.replace("return hot", "hot.send = (data) => socket.send(data);return hot;");
359
359
  if (entries.has(getPath(id)) && code.includes("import.meta.hot")) {
360
360
  const snippet = `
361
- if (import.meta.hot) { try { import.meta.hot.send('${WS_EVENT_PREFIX}${lastServed}') } catch {} }`;
361
+ if (import.meta.hot) { try { import.meta.hot.send('${WS_EVENT_PREFIX}${lastServed}') } catch (e) { console.warn('[unocss-hmr]', e) } }`;
362
362
  return code + snippet;
363
363
  }
364
364
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@unocss/vite",
3
- "version": "0.26.1",
3
+ "version": "0.26.4",
4
4
  "description": "The Vite plugin for UnoCSS",
5
5
  "keywords": [
6
6
  "unocss",
@@ -35,14 +35,14 @@
35
35
  "types": "dist/index.d.ts",
36
36
  "dependencies": {
37
37
  "@rollup/pluginutils": "^4.1.2",
38
- "@unocss/config": "0.26.1",
39
- "@unocss/core": "0.26.1",
40
- "@unocss/transformer-directives": "0.26.1",
41
- "@unocss/inspector": "0.26.1",
42
- "@unocss/scope": "0.26.1"
38
+ "@unocss/config": "0.26.4",
39
+ "@unocss/core": "0.26.4",
40
+ "@unocss/inspector": "0.26.4",
41
+ "@unocss/scope": "0.26.4",
42
+ "@unocss/transformer-directives": "0.26.4"
43
43
  },
44
44
  "devDependencies": {
45
- "vite": "^2.7.13"
45
+ "vite": "^2.8.4"
46
46
  },
47
47
  "scripts": {
48
48
  "build": "unbuild",