@unocss/postcss 0.64.0 → 0.65.0-beta.1

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 +4 -4
  2. package/package.json +4 -4
package/dist/esm.mjs CHANGED
@@ -63,13 +63,13 @@ async function parseApply(root, uno, directiveName) {
63
63
  css_parsed.walkDecls((declaration) => {
64
64
  declaration.source = source;
65
65
  });
66
- parentAfterNodes.push(css_parsed);
66
+ parentAfterNodes.push(...css_parsed.nodes);
67
67
  } else {
68
68
  const css = postcss.parse(body);
69
69
  css.walkDecls((declaration) => {
70
70
  declaration.source = source;
71
71
  });
72
- rule.parent.append(css);
72
+ rule.parent.insertAfter(rule, css);
73
73
  }
74
74
  }
75
75
  rule.parent.after(parentAfterNodes);
@@ -187,11 +187,11 @@ function createPlugin(options) {
187
187
  try {
188
188
  const cfg = await config;
189
189
  if (!uno) {
190
- uno = createGenerator(cfg.config);
190
+ uno = await createGenerator(cfg.config);
191
191
  } else if (cfg.sources.length) {
192
192
  const config_mtime = (await stat(cfg.sources[0])).mtimeMs;
193
193
  if (config_mtime > last_config_mtime) {
194
- uno = createGenerator((await loadConfig()).config);
194
+ uno = await createGenerator((await loadConfig()).config);
195
195
  last_config_mtime = config_mtime;
196
196
  }
197
197
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@unocss/postcss",
3
3
  "type": "module",
4
- "version": "0.64.0",
4
+ "version": "0.65.0-beta.1",
5
5
  "description": "PostCSS plugin for UnoCSS",
6
6
  "author": "sibbng <sibbngheid@gmail.com>",
7
7
  "license": "MIT",
@@ -57,9 +57,9 @@
57
57
  "css-tree": "^3.0.1",
58
58
  "postcss": "^8.4.47",
59
59
  "tinyglobby": "^0.2.10",
60
- "@unocss/config": "0.64.0",
61
- "@unocss/rule-utils": "0.64.0",
62
- "@unocss/core": "0.64.0"
60
+ "@unocss/config": "0.65.0-beta.1",
61
+ "@unocss/rule-utils": "0.65.0-beta.1",
62
+ "@unocss/core": "0.65.0-beta.1"
63
63
  },
64
64
  "scripts": {
65
65
  "build": "unbuild",