@unocss/vite 0.50.4 → 0.50.6
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 +10 -2
- package/dist/index.mjs +10 -2
- package/package.json +8 -8
package/dist/index.cjs
CHANGED
|
@@ -659,7 +659,10 @@ function GlobalModeDevPlugin({ uno, tokens, tasks, flushTasks, affectedModules,
|
|
|
659
659
|
if (!layer)
|
|
660
660
|
return null;
|
|
661
661
|
const { hash, css } = await generateCSS(layer);
|
|
662
|
-
return
|
|
662
|
+
return {
|
|
663
|
+
code: `__uno_hash_${hash}{--:'';}${css}`,
|
|
664
|
+
map: { mappings: "" }
|
|
665
|
+
};
|
|
663
666
|
}
|
|
664
667
|
},
|
|
665
668
|
{
|
|
@@ -691,7 +694,12 @@ if (!import.meta.url.includes('?'))
|
|
|
691
694
|
})()`;
|
|
692
695
|
hmr = `
|
|
693
696
|
if (import.meta.hot) {${hmr}}`;
|
|
694
|
-
|
|
697
|
+
const s = new MagicString__default(code);
|
|
698
|
+
s.append(hmr);
|
|
699
|
+
return {
|
|
700
|
+
code: s.toString(),
|
|
701
|
+
map: s.generateMap()
|
|
702
|
+
};
|
|
695
703
|
}
|
|
696
704
|
}
|
|
697
705
|
}
|
package/dist/index.mjs
CHANGED
|
@@ -646,7 +646,10 @@ function GlobalModeDevPlugin({ uno, tokens, tasks, flushTasks, affectedModules,
|
|
|
646
646
|
if (!layer)
|
|
647
647
|
return null;
|
|
648
648
|
const { hash, css } = await generateCSS(layer);
|
|
649
|
-
return
|
|
649
|
+
return {
|
|
650
|
+
code: `__uno_hash_${hash}{--:'';}${css}`,
|
|
651
|
+
map: { mappings: "" }
|
|
652
|
+
};
|
|
650
653
|
}
|
|
651
654
|
},
|
|
652
655
|
{
|
|
@@ -678,7 +681,12 @@ if (!import.meta.url.includes('?'))
|
|
|
678
681
|
})()`;
|
|
679
682
|
hmr = `
|
|
680
683
|
if (import.meta.hot) {${hmr}}`;
|
|
681
|
-
|
|
684
|
+
const s = new MagicString(code);
|
|
685
|
+
s.append(hmr);
|
|
686
|
+
return {
|
|
687
|
+
code: s.toString(),
|
|
688
|
+
map: s.generateMap()
|
|
689
|
+
};
|
|
682
690
|
}
|
|
683
691
|
}
|
|
684
692
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@unocss/vite",
|
|
3
|
-
"version": "0.50.
|
|
3
|
+
"version": "0.50.6",
|
|
4
4
|
"description": "The Vite plugin for UnoCSS",
|
|
5
5
|
"author": "Anthony Fu <anthonyfu117@hotmail.com>",
|
|
6
6
|
"license": "MIT",
|
|
@@ -47,15 +47,15 @@
|
|
|
47
47
|
"chokidar": "^3.5.3",
|
|
48
48
|
"fast-glob": "^3.2.12",
|
|
49
49
|
"magic-string": "^0.30.0",
|
|
50
|
-
"@unocss/config": "0.50.
|
|
51
|
-
"@unocss/core": "0.50.
|
|
52
|
-
"@unocss/inspector": "0.50.
|
|
53
|
-
"@unocss/scope": "0.50.
|
|
54
|
-
"@unocss/transformer-directives": "0.50.
|
|
50
|
+
"@unocss/config": "0.50.6",
|
|
51
|
+
"@unocss/core": "0.50.6",
|
|
52
|
+
"@unocss/inspector": "0.50.6",
|
|
53
|
+
"@unocss/scope": "0.50.6",
|
|
54
|
+
"@unocss/transformer-directives": "0.50.6"
|
|
55
55
|
},
|
|
56
56
|
"devDependencies": {
|
|
57
|
-
"vite": "^4.
|
|
58
|
-
"@unocss/shared-integration": "0.50.
|
|
57
|
+
"vite": "^4.2.0",
|
|
58
|
+
"@unocss/shared-integration": "0.50.6"
|
|
59
59
|
},
|
|
60
60
|
"scripts": {
|
|
61
61
|
"build": "unbuild",
|