@unocss/vite 0.24.1 → 0.24.2

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
@@ -363,7 +363,7 @@ function GlobalModeDevPlugin({ uno, tokens, onInvalidate, extract, filter }) {
363
363
  return code.replace("return hot", "hot.send = (data) => socket.send(data);return hot;");
364
364
  if (entries.has(getPath(id)) && code.includes("import.meta.hot")) {
365
365
  const snippet = `
366
- if (import.meta.hot) { import.meta.hot.send('${WS_EVENT_PREFIX}${lastServed}') }`;
366
+ if (import.meta.hot) { try { import.meta.hot.send('${WS_EVENT_PREFIX}${lastServed}') } catch {} }`;
367
367
  return code + snippet;
368
368
  }
369
369
  }
package/dist/index.mjs CHANGED
@@ -355,7 +355,7 @@ function GlobalModeDevPlugin({ uno, tokens, onInvalidate, extract, filter }) {
355
355
  return code.replace("return hot", "hot.send = (data) => socket.send(data);return hot;");
356
356
  if (entries.has(getPath(id)) && code.includes("import.meta.hot")) {
357
357
  const snippet = `
358
- if (import.meta.hot) { import.meta.hot.send('${WS_EVENT_PREFIX}${lastServed}') }`;
358
+ if (import.meta.hot) { try { import.meta.hot.send('${WS_EVENT_PREFIX}${lastServed}') } catch {} }`;
359
359
  return code + snippet;
360
360
  }
361
361
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@unocss/vite",
3
- "version": "0.24.1",
3
+ "version": "0.24.2",
4
4
  "description": "The Vite plugin for UnoCSS",
5
5
  "keywords": [
6
6
  "unocss",
@@ -35,10 +35,10 @@
35
35
  ],
36
36
  "dependencies": {
37
37
  "@rollup/pluginutils": "^4.1.2",
38
- "@unocss/config": "0.24.1",
39
- "@unocss/core": "0.24.1",
40
- "@unocss/inspector": "0.24.1",
41
- "@unocss/scope": "0.24.1"
38
+ "@unocss/config": "0.24.2",
39
+ "@unocss/core": "0.24.2",
40
+ "@unocss/inspector": "0.24.2",
41
+ "@unocss/scope": "0.24.2"
42
42
  },
43
43
  "devDependencies": {
44
44
  "vite": "^2.7.13"