@unocss/postcss 0.61.3 → 0.61.5

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/esm.mjs +3 -2
  2. package/package.json +4 -4
package/dist/esm.mjs CHANGED
@@ -4,7 +4,7 @@ import process from 'node:process';
4
4
  import fg from 'fast-glob';
5
5
  import postcss from 'postcss';
6
6
  import { expandVariantGroup, notNull, regexScopePlaceholder, createGenerator } from '@unocss/core';
7
- import { loadConfig } from '@unocss/config';
7
+ import { createRecoveryConfigLoader } from '@unocss/config';
8
8
  import { transformThemeFn, hasThemeFn } from '@unocss/rule-utils';
9
9
  import { parse, generate, clone } from 'css-tree';
10
10
 
@@ -147,6 +147,7 @@ function createPlugin(options) {
147
147
  const fileClassMap = /* @__PURE__ */ new Map();
148
148
  const classes = /* @__PURE__ */ new Set();
149
149
  const targetCache = /* @__PURE__ */ new Set();
150
+ const loadConfig = createRecoveryConfigLoader();
150
151
  const config = loadConfig(cwd, configOrPath);
151
152
  let uno;
152
153
  let promises = [];
@@ -190,7 +191,7 @@ function createPlugin(options) {
190
191
  } else if (cfg.sources.length) {
191
192
  const config_mtime = (await stat(cfg.sources[0])).mtimeMs;
192
193
  if (config_mtime > last_config_mtime) {
193
- uno = createGenerator((await loadConfig(cwd, configOrPath)).config);
194
+ uno = createGenerator((await loadConfig()).config);
194
195
  last_config_mtime = config_mtime;
195
196
  }
196
197
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@unocss/postcss",
3
3
  "type": "module",
4
- "version": "0.61.3",
4
+ "version": "0.61.5",
5
5
  "description": "PostCSS plugin for UnoCSS",
6
6
  "author": "sibbng <sibbngheid@gmail.com>",
7
7
  "license": "MIT",
@@ -58,9 +58,9 @@
58
58
  "fast-glob": "^3.3.2",
59
59
  "magic-string": "^0.30.10",
60
60
  "postcss": "^8.4.39",
61
- "@unocss/config": "0.61.3",
62
- "@unocss/rule-utils": "0.61.3",
63
- "@unocss/core": "0.61.3"
61
+ "@unocss/config": "0.61.5",
62
+ "@unocss/core": "0.61.5",
63
+ "@unocss/rule-utils": "0.61.5"
64
64
  },
65
65
  "scripts": {
66
66
  "build": "unbuild",