@unocss/vite 66.4.0 → 66.4.1
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.mjs +6 -0
- package/package.json +4 -4
package/dist/index.mjs
CHANGED
|
@@ -493,6 +493,7 @@ function GlobalModeBuildPlugin(ctx) {
|
|
|
493
493
|
const { ready, extract, tokens, filter, getConfig, tasks, flushTasks } = ctx;
|
|
494
494
|
const vfsLayers = /* @__PURE__ */ new Map();
|
|
495
495
|
const resolveContexts = /* @__PURE__ */ new Map();
|
|
496
|
+
const unocssImporters = /* @__PURE__ */ new Set();
|
|
496
497
|
let viteConfig;
|
|
497
498
|
const cssPostPlugins = /* @__PURE__ */ new Map();
|
|
498
499
|
const cssPlugins = /* @__PURE__ */ new Map();
|
|
@@ -561,6 +562,8 @@ function GlobalModeBuildPlugin(ctx) {
|
|
|
561
562
|
if (entry) {
|
|
562
563
|
const layer = resolveLayer(entry);
|
|
563
564
|
if (layer) {
|
|
565
|
+
if (importer)
|
|
566
|
+
unocssImporters.add(importer);
|
|
564
567
|
if (vfsLayers.has(layer)) {
|
|
565
568
|
this.warn(`[unocss] ${JSON.stringify(id)} is being imported multiple times in different files, using the first occurrence: ${JSON.stringify(vfsLayers.get(layer))}`);
|
|
566
569
|
return vfsLayers.get(layer);
|
|
@@ -584,6 +587,9 @@ function GlobalModeBuildPlugin(ctx) {
|
|
|
584
587
|
};
|
|
585
588
|
}
|
|
586
589
|
},
|
|
590
|
+
shouldTransformCachedModule({ id }) {
|
|
591
|
+
return unocssImporters.delete(id);
|
|
592
|
+
},
|
|
587
593
|
async configResolved(config) {
|
|
588
594
|
const distDirs = [
|
|
589
595
|
resolve(config.root, config.build.outDir)
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@unocss/vite",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "66.4.
|
|
4
|
+
"version": "66.4.1",
|
|
5
5
|
"description": "The Vite plugin for UnoCSS",
|
|
6
6
|
"author": "Anthony Fu <anthonyfu117@hotmail.com>",
|
|
7
7
|
"license": "MIT",
|
|
@@ -55,9 +55,9 @@
|
|
|
55
55
|
"pathe": "^2.0.3",
|
|
56
56
|
"tinyglobby": "^0.2.14",
|
|
57
57
|
"unplugin-utils": "^0.2.4",
|
|
58
|
-
"@unocss/
|
|
59
|
-
"@unocss/core": "66.4.
|
|
60
|
-
"@unocss/
|
|
58
|
+
"@unocss/inspector": "66.4.1",
|
|
59
|
+
"@unocss/core": "66.4.1",
|
|
60
|
+
"@unocss/config": "66.4.1"
|
|
61
61
|
},
|
|
62
62
|
"devDependencies": {
|
|
63
63
|
"vite": "^7.0.6"
|