@unocss/vite 0.61.0 → 0.61.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.
Files changed (2) hide show
  1. package/dist/index.mjs +13 -3
  2. package/package.json +8 -8
package/dist/index.mjs CHANGED
@@ -910,10 +910,16 @@ function VueScopedPlugin({ uno, ready }) {
910
910
  config.content?.pipeline?.exclude ?? config.exclude ?? defaultPipelineExclude
911
911
  );
912
912
  },
913
- transform(code, id) {
913
+ async transform(code, id) {
914
914
  if (!filter(id) || !id.endsWith(".vue"))
915
915
  return;
916
- return transformSFC(code);
916
+ const css = await transformSFC(code);
917
+ if (css) {
918
+ return {
919
+ code: css,
920
+ map: null
921
+ };
922
+ }
917
923
  },
918
924
  handleHotUpdate(ctx) {
919
925
  const read = ctx.read;
@@ -1016,7 +1022,11 @@ function ShadowDomModuleModePlugin({ uno }) {
1016
1022
  name: "unocss:shadow-dom",
1017
1023
  enforce: "pre",
1018
1024
  async transform(code, id) {
1019
- return transformWebComponent(code, id);
1025
+ const css = await transformWebComponent(code, id);
1026
+ return {
1027
+ code: css,
1028
+ map: null
1029
+ };
1020
1030
  },
1021
1031
  handleHotUpdate(ctx) {
1022
1032
  const read = ctx.read;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@unocss/vite",
3
3
  "type": "module",
4
- "version": "0.61.0",
4
+ "version": "0.61.2",
5
5
  "description": "The Vite plugin for UnoCSS",
6
6
  "author": "Anthony Fu <anthonyfu117@hotmail.com>",
7
7
  "license": "MIT",
@@ -54,15 +54,15 @@
54
54
  "chokidar": "^3.6.0",
55
55
  "fast-glob": "^3.3.2",
56
56
  "magic-string": "^0.30.10",
57
- "@unocss/config": "0.61.0",
58
- "@unocss/inspector": "0.61.0",
59
- "@unocss/core": "0.61.0",
60
- "@unocss/scope": "0.61.0",
61
- "@unocss/transformer-directives": "0.61.0"
57
+ "@unocss/config": "0.61.2",
58
+ "@unocss/core": "0.61.2",
59
+ "@unocss/scope": "0.61.2",
60
+ "@unocss/inspector": "0.61.2",
61
+ "@unocss/transformer-directives": "0.61.2"
62
62
  },
63
63
  "devDependencies": {
64
- "vite": "^5.2.13",
65
- "@unocss/shared-integration": "0.61.0"
64
+ "vite": "^5.3.1",
65
+ "@unocss/shared-integration": "0.61.2"
66
66
  },
67
67
  "scripts": {
68
68
  "build": "unbuild",