@unocss/nuxt 0.61.3 → 0.61.4
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 +8 -4
- package/package.json +14 -14
package/dist/index.mjs
CHANGED
|
@@ -4,7 +4,7 @@ import process from 'node:process';
|
|
|
4
4
|
import { defineNuxtModule, addPluginTemplate, isNuxt2, addComponentsDir, addTemplate, findPath, extendWebpackConfig, isNuxt3 } from '@nuxt/kit';
|
|
5
5
|
import WebpackPlugin from '@unocss/webpack';
|
|
6
6
|
import VitePlugin from '@unocss/vite';
|
|
7
|
-
import {
|
|
7
|
+
import { createRecoveryConfigLoader } from '@unocss/config';
|
|
8
8
|
import presetUno from '@unocss/preset-uno';
|
|
9
9
|
import presetAttributify from '@unocss/preset-attributify';
|
|
10
10
|
import presetIcons from '@unocss/preset-icons';
|
|
@@ -67,6 +67,7 @@ const index = defineNuxtModule({
|
|
|
67
67
|
async setup(options, nuxt) {
|
|
68
68
|
var _a;
|
|
69
69
|
resolveOptions(options);
|
|
70
|
+
const loadConfig = createRecoveryConfigLoader();
|
|
70
71
|
options.mode ?? (options.mode = "global");
|
|
71
72
|
const InjectModes = ["global", "dist-chunk"];
|
|
72
73
|
if (options.disableNuxtInlineStyle) {
|
|
@@ -112,9 +113,12 @@ export default mergeConfigs([${configPaths.map((_, index) => `cfg${index}`).join
|
|
|
112
113
|
});
|
|
113
114
|
}
|
|
114
115
|
async function loadUnoConfig() {
|
|
115
|
-
const { config: unoConfig } = await loadConfig(
|
|
116
|
-
|
|
117
|
-
|
|
116
|
+
const { config: unoConfig } = await loadConfig(
|
|
117
|
+
process.cwd(),
|
|
118
|
+
{ configFile: options.configFile },
|
|
119
|
+
[],
|
|
120
|
+
options
|
|
121
|
+
);
|
|
118
122
|
await nuxt.callHook("unocss:config", unoConfig);
|
|
119
123
|
if (isNuxt3() && nuxt.options.builder === "@nuxt/vite-builder" && nuxt.options.postcss.plugins.cssnano && unoConfig.transformers?.some((t) => t.name === "@unocss/transformer-directives" && t.enforce !== "pre")) {
|
|
120
124
|
const preset = nuxt.options.postcss.plugins.cssnano.preset;
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@unocss/nuxt",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.61.
|
|
4
|
+
"version": "0.61.4",
|
|
5
5
|
"description": "Nuxt module for UnoCSS",
|
|
6
6
|
"author": "Anthony Fu <anthonyfu117@hotmail.com>",
|
|
7
7
|
"license": "MIT",
|
|
@@ -39,19 +39,19 @@
|
|
|
39
39
|
],
|
|
40
40
|
"dependencies": {
|
|
41
41
|
"@nuxt/kit": "^3.12.3",
|
|
42
|
-
"@unocss/config": "0.61.
|
|
43
|
-
"@unocss/
|
|
44
|
-
"@unocss/
|
|
45
|
-
"@unocss/preset-
|
|
46
|
-
"@unocss/preset-
|
|
47
|
-
"@unocss/preset-
|
|
48
|
-
"@unocss/preset-uno": "0.61.
|
|
49
|
-
"@unocss/preset-
|
|
50
|
-
"@unocss/preset-
|
|
51
|
-
"@unocss/
|
|
52
|
-
"@unocss/
|
|
53
|
-
"@unocss/
|
|
54
|
-
"unocss": "0.61.
|
|
42
|
+
"@unocss/config": "0.61.4",
|
|
43
|
+
"@unocss/preset-attributify": "0.61.4",
|
|
44
|
+
"@unocss/core": "0.61.4",
|
|
45
|
+
"@unocss/preset-icons": "0.61.4",
|
|
46
|
+
"@unocss/preset-tagify": "0.61.4",
|
|
47
|
+
"@unocss/preset-web-fonts": "0.61.4",
|
|
48
|
+
"@unocss/preset-uno": "0.61.4",
|
|
49
|
+
"@unocss/preset-typography": "0.61.4",
|
|
50
|
+
"@unocss/preset-wind": "0.61.4",
|
|
51
|
+
"@unocss/vite": "0.61.4",
|
|
52
|
+
"@unocss/reset": "0.61.4",
|
|
53
|
+
"@unocss/webpack": "0.61.4",
|
|
54
|
+
"unocss": "0.61.4"
|
|
55
55
|
},
|
|
56
56
|
"devDependencies": {
|
|
57
57
|
"@nuxt/schema": "^3.12.3"
|