@unocss/nuxt 0.50.0 → 0.50.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 +9 -1
  2. package/package.json +14 -14
package/dist/index.mjs CHANGED
@@ -11,6 +11,9 @@ import presetWebFonts from '@unocss/preset-web-fonts';
11
11
  import presetTypography from '@unocss/preset-typography';
12
12
  import presetTagify from '@unocss/preset-tagify';
13
13
  import presetWind from '@unocss/preset-wind';
14
+ import { cssIdRE } from '@unocss/core';
15
+
16
+ const defaultExclude = [cssIdRE];
14
17
 
15
18
  function resolveOptions(options) {
16
19
  if (options.presets == null) {
@@ -30,6 +33,9 @@ function resolveOptions(options) {
30
33
  options.presets.push(preset(typeof option === "boolean" ? {} : option));
31
34
  }
32
35
  }
36
+ options.exclude = options.exclude || defaultExclude;
37
+ if (Array.isArray(options.exclude))
38
+ options.exclude.push(/\?macro=true/);
33
39
  }
34
40
 
35
41
  const dir = dirname(fileURLToPath(import.meta.url));
@@ -70,7 +76,9 @@ const index = defineNuxtModule({
70
76
  watch: false
71
77
  });
72
78
  }
73
- const { config: unoConfig } = await loadConfig(process.cwd(), {}, [], options);
79
+ const { config: unoConfig } = await loadConfig(process.cwd(), {
80
+ configFile: options.configFile
81
+ }, [], options);
74
82
  if (isNuxt3() && nuxt.options.postcss.plugins.cssnano && unoConfig.transformers?.some((t) => t.name === "@unocss/transformer-directives" && t.enforce !== "pre")) {
75
83
  const preset = nuxt.options.postcss.plugins.cssnano.preset;
76
84
  nuxt.options.postcss.plugins.cssnano = {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@unocss/nuxt",
3
- "version": "0.50.0",
3
+ "version": "0.50.2",
4
4
  "description": "Nuxt module for UnoCSS",
5
5
  "author": "Anthony Fu <anthonyfu117@hotmail.com>",
6
6
  "license": "MIT",
@@ -38,19 +38,19 @@
38
38
  ],
39
39
  "dependencies": {
40
40
  "@nuxt/kit": "^3.2.2",
41
- "@unocss/config": "0.50.0",
42
- "@unocss/core": "0.50.0",
43
- "@unocss/preset-attributify": "0.50.0",
44
- "@unocss/preset-icons": "0.50.0",
45
- "@unocss/preset-tagify": "0.50.0",
46
- "@unocss/preset-typography": "0.50.0",
47
- "@unocss/preset-uno": "0.50.0",
48
- "@unocss/preset-web-fonts": "0.50.0",
49
- "@unocss/preset-wind": "0.50.0",
50
- "@unocss/reset": "0.50.0",
51
- "@unocss/vite": "0.50.0",
52
- "@unocss/webpack": "0.50.0",
53
- "unocss": "0.50.0"
41
+ "@unocss/config": "0.50.2",
42
+ "@unocss/core": "0.50.2",
43
+ "@unocss/preset-attributify": "0.50.2",
44
+ "@unocss/preset-icons": "0.50.2",
45
+ "@unocss/preset-tagify": "0.50.2",
46
+ "@unocss/preset-typography": "0.50.2",
47
+ "@unocss/preset-uno": "0.50.2",
48
+ "@unocss/preset-web-fonts": "0.50.2",
49
+ "@unocss/preset-wind": "0.50.2",
50
+ "@unocss/reset": "0.50.2",
51
+ "@unocss/vite": "0.50.2",
52
+ "@unocss/webpack": "0.50.2",
53
+ "unocss": "0.50.2"
54
54
  },
55
55
  "devDependencies": {
56
56
  "@nuxt/schema": "^3.2.2"