@unocss/nuxt 0.65.2 → 0.65.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.
Files changed (2) hide show
  1. package/dist/index.mjs +6 -8
  2. package/package.json +16 -16
package/dist/index.mjs CHANGED
@@ -17,7 +17,6 @@ import { cssIdRE } from '@unocss/core';
17
17
  const defaultPipelineExclude = [cssIdRE];
18
18
 
19
19
  function resolveOptions(options) {
20
- var _a, _b;
21
20
  if (options.presets == null) {
22
21
  options.presets = [];
23
22
  const presetMap = {
@@ -35,10 +34,10 @@ function resolveOptions(options) {
35
34
  options.presets.push(preset(typeof option === "boolean" ? {} : option));
36
35
  }
37
36
  }
38
- options.content ?? (options.content = {});
39
- (_a = options.content).pipeline ?? (_a.pipeline = {});
37
+ options.content ??= {};
38
+ options.content.pipeline ??= {};
40
39
  if (options.content.pipeline !== false) {
41
- (_b = options.content.pipeline).exclude ?? (_b.exclude = defaultPipelineExclude);
40
+ options.content.pipeline.exclude ??= defaultPipelineExclude;
42
41
  if (Array.isArray(options.content.pipeline.exclude))
43
42
  options.content.pipeline.exclude.push(/\?macro=true/);
44
43
  }
@@ -65,13 +64,12 @@ const index = defineNuxtModule({
65
64
  wind: false
66
65
  },
67
66
  async setup(options, nuxt) {
68
- var _a;
69
67
  resolveOptions(options);
70
68
  const loadConfig = createRecoveryConfigLoader();
71
- options.mode ?? (options.mode = "global");
69
+ options.mode ??= "global";
72
70
  const InjectModes = ["global", "dist-chunk"];
73
71
  if (options.disableNuxtInlineStyle) {
74
- (_a = nuxt.options).features || (_a.features = {});
72
+ nuxt.options.features ||= {};
75
73
  nuxt.options.features.inlineStyles = false;
76
74
  }
77
75
  if (options.injectPosition != null)
@@ -101,7 +99,7 @@ const index = defineNuxtModule({
101
99
  filename: "uno.config.mjs",
102
100
  async getContents() {
103
101
  const configPaths = (await Promise.all(nuxt.options._layers.slice(1).map(
104
- (layer) => findPath(options.configFile || ["uno.config", "unocss.config"], { cwd: layer.config.srcDir })
102
+ (layer) => findPath(options.configFile || ["uno.config", "unocss.config"], { cwd: layer.config.rootDir })
105
103
  ))).filter(Boolean).reverse();
106
104
  return `import { mergeConfigs } from '@unocss/core'
107
105
  ${configPaths.map((path, index) => `import cfg${index} from '${path}'`.trimStart()).join("\n").trimEnd()}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@unocss/nuxt",
3
3
  "type": "module",
4
- "version": "0.65.2",
4
+ "version": "0.65.4",
5
5
  "description": "Nuxt module for UnoCSS",
6
6
  "author": "Anthony Fu <anthonyfu117@hotmail.com>",
7
7
  "license": "MIT",
@@ -38,23 +38,23 @@
38
38
  "runtime"
39
39
  ],
40
40
  "dependencies": {
41
- "@nuxt/kit": "^3.14.1592",
42
- "@unocss/config": "0.65.2",
43
- "@unocss/core": "0.65.2",
44
- "@unocss/preset-attributify": "0.65.2",
45
- "@unocss/preset-icons": "0.65.2",
46
- "@unocss/preset-tagify": "0.65.2",
47
- "@unocss/preset-typography": "0.65.2",
48
- "@unocss/preset-uno": "0.65.2",
49
- "@unocss/preset-web-fonts": "0.65.2",
50
- "@unocss/preset-wind": "0.65.2",
51
- "@unocss/reset": "0.65.2",
52
- "@unocss/webpack": "0.65.2",
53
- "unocss": "0.65.2",
54
- "@unocss/vite": "0.65.2"
41
+ "@nuxt/kit": "^3.15.0",
42
+ "@unocss/config": "0.65.4",
43
+ "@unocss/preset-attributify": "0.65.4",
44
+ "@unocss/core": "0.65.4",
45
+ "@unocss/preset-tagify": "0.65.4",
46
+ "@unocss/preset-web-fonts": "0.65.4",
47
+ "@unocss/preset-typography": "0.65.4",
48
+ "@unocss/preset-icons": "0.65.4",
49
+ "@unocss/preset-wind": "0.65.4",
50
+ "@unocss/preset-uno": "0.65.4",
51
+ "@unocss/vite": "0.65.4",
52
+ "@unocss/reset": "0.65.4",
53
+ "@unocss/webpack": "0.65.4",
54
+ "unocss": "0.65.4"
55
55
  },
56
56
  "devDependencies": {
57
- "@nuxt/schema": "^3.14.1592"
57
+ "@nuxt/schema": "^3.15.0"
58
58
  },
59
59
  "scripts": {
60
60
  "build": "unbuild",