@unocss/vite 0.49.8 → 0.50.0
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 +20 -3
- package/dist/index.mjs +20 -3
- package/package.json +8 -8
package/dist/index.cjs
CHANGED
|
@@ -394,9 +394,26 @@ function GlobalModeBuildPlugin(ctx) {
|
|
|
394
394
|
}
|
|
395
395
|
},
|
|
396
396
|
async configResolved(config) {
|
|
397
|
-
const
|
|
398
|
-
|
|
399
|
-
|
|
397
|
+
const distDirs = [
|
|
398
|
+
path.resolve(config.root, config.build.outDir)
|
|
399
|
+
];
|
|
400
|
+
if (config.build.rollupOptions.output) {
|
|
401
|
+
const outputOptions = config.build.rollupOptions.output;
|
|
402
|
+
if (Array.isArray(outputOptions)) {
|
|
403
|
+
distDirs.push(
|
|
404
|
+
...outputOptions.map((option) => option.dir).filter(Boolean)
|
|
405
|
+
);
|
|
406
|
+
} else {
|
|
407
|
+
if (outputOptions.dir)
|
|
408
|
+
distDirs.push(outputOptions.dir);
|
|
409
|
+
}
|
|
410
|
+
}
|
|
411
|
+
const cssPostPlugin = config.plugins.find((i) => i.name === "vite:css-post");
|
|
412
|
+
const cssPlugin = config.plugins.find((i) => i.name === "vite:css");
|
|
413
|
+
if (cssPostPlugin)
|
|
414
|
+
distDirs.forEach((dir) => cssPostPlugins.set(dir, cssPostPlugin));
|
|
415
|
+
if (cssPlugin)
|
|
416
|
+
distDirs.forEach((dir) => cssPlugins.set(dir, cssPlugin));
|
|
400
417
|
await ready;
|
|
401
418
|
},
|
|
402
419
|
async renderChunk(_, chunk, options) {
|
package/dist/index.mjs
CHANGED
|
@@ -381,9 +381,26 @@ function GlobalModeBuildPlugin(ctx) {
|
|
|
381
381
|
}
|
|
382
382
|
},
|
|
383
383
|
async configResolved(config) {
|
|
384
|
-
const
|
|
385
|
-
|
|
386
|
-
|
|
384
|
+
const distDirs = [
|
|
385
|
+
resolve(config.root, config.build.outDir)
|
|
386
|
+
];
|
|
387
|
+
if (config.build.rollupOptions.output) {
|
|
388
|
+
const outputOptions = config.build.rollupOptions.output;
|
|
389
|
+
if (Array.isArray(outputOptions)) {
|
|
390
|
+
distDirs.push(
|
|
391
|
+
...outputOptions.map((option) => option.dir).filter(Boolean)
|
|
392
|
+
);
|
|
393
|
+
} else {
|
|
394
|
+
if (outputOptions.dir)
|
|
395
|
+
distDirs.push(outputOptions.dir);
|
|
396
|
+
}
|
|
397
|
+
}
|
|
398
|
+
const cssPostPlugin = config.plugins.find((i) => i.name === "vite:css-post");
|
|
399
|
+
const cssPlugin = config.plugins.find((i) => i.name === "vite:css");
|
|
400
|
+
if (cssPostPlugin)
|
|
401
|
+
distDirs.forEach((dir) => cssPostPlugins.set(dir, cssPostPlugin));
|
|
402
|
+
if (cssPlugin)
|
|
403
|
+
distDirs.forEach((dir) => cssPlugins.set(dir, cssPlugin));
|
|
387
404
|
await ready;
|
|
388
405
|
},
|
|
389
406
|
async renderChunk(_, chunk, options) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@unocss/vite",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.50.0",
|
|
4
4
|
"description": "The Vite plugin for UnoCSS",
|
|
5
5
|
"author": "Anthony Fu <anthonyfu117@hotmail.com>",
|
|
6
6
|
"license": "MIT",
|
|
@@ -44,18 +44,18 @@
|
|
|
44
44
|
"dependencies": {
|
|
45
45
|
"@ampproject/remapping": "^2.2.0",
|
|
46
46
|
"@rollup/pluginutils": "^5.0.2",
|
|
47
|
-
"@unocss/config": "0.
|
|
48
|
-
"@unocss/core": "0.
|
|
49
|
-
"@unocss/inspector": "0.
|
|
50
|
-
"@unocss/scope": "0.
|
|
51
|
-
"@unocss/transformer-directives": "0.
|
|
47
|
+
"@unocss/config": "0.50.0",
|
|
48
|
+
"@unocss/core": "0.50.0",
|
|
49
|
+
"@unocss/inspector": "0.50.0",
|
|
50
|
+
"@unocss/scope": "0.50.0",
|
|
51
|
+
"@unocss/transformer-directives": "0.50.0",
|
|
52
52
|
"chokidar": "^3.5.3",
|
|
53
53
|
"fast-glob": "^3.2.12",
|
|
54
54
|
"magic-string": "^0.29.0"
|
|
55
55
|
},
|
|
56
56
|
"devDependencies": {
|
|
57
|
-
"@unocss/shared-integration": "0.
|
|
58
|
-
"vite": "^4.1.
|
|
57
|
+
"@unocss/shared-integration": "0.50.0",
|
|
58
|
+
"vite": "^4.1.4"
|
|
59
59
|
},
|
|
60
60
|
"scripts": {
|
|
61
61
|
"build": "unbuild",
|