@unocss/vite 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.
Files changed (2) hide show
  1. package/dist/index.mjs +4 -2
  2. package/package.json +8 -8
package/dist/index.mjs CHANGED
@@ -11,7 +11,7 @@ import { Buffer } from 'node:buffer';
11
11
  import { createFilter } from '@rollup/pluginutils';
12
12
  import fs$1 from 'node:fs';
13
13
  import { fileURLToPath } from 'node:url';
14
- import { loadConfig } from '@unocss/config';
14
+ import { createRecoveryConfigLoader } from '@unocss/config';
15
15
 
16
16
  const defaultPipelineExclude = [cssIdRE];
17
17
  const defaultPipelineInclude = [/\.(vue|svelte|[jt]sx|mdx?|astro|elm|php|phtml|html)($|\?)/];
@@ -88,6 +88,7 @@ function createContext(configOrPath, defaults = {}, extraConfigSources = [], res
88
88
  const tokens = /* @__PURE__ */ new Set();
89
89
  const tasks = [];
90
90
  const affectedModules = /* @__PURE__ */ new Set();
91
+ const loadConfig = createRecoveryConfigLoader();
91
92
  let ready = reloadConfig();
92
93
  async function reloadConfig() {
93
94
  const result = await loadConfig(root, configOrPath, extraConfigSources, defaults);
@@ -150,7 +151,8 @@ function createContext(configOrPath, defaults = {}, extraConfigSources = [], res
150
151
  async function flushTasks() {
151
152
  const _tasks = [...tasks];
152
153
  await Promise.all(_tasks);
153
- tasks.splice(0, _tasks.length);
154
+ if (tasks[0] === _tasks[0])
155
+ tasks.splice(0, _tasks.length);
154
156
  }
155
157
  return {
156
158
  get ready() {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@unocss/vite",
3
3
  "type": "module",
4
- "version": "0.61.3",
4
+ "version": "0.61.4",
5
5
  "description": "The Vite plugin for UnoCSS",
6
6
  "author": "Anthony Fu <anthonyfu117@hotmail.com>",
7
7
  "license": "MIT",
@@ -54,15 +54,15 @@
54
54
  "chokidar": "^3.6.0",
55
55
  "fast-glob": "^3.3.2",
56
56
  "magic-string": "^0.30.10",
57
- "@unocss/config": "0.61.3",
58
- "@unocss/core": "0.61.3",
59
- "@unocss/inspector": "0.61.3",
60
- "@unocss/scope": "0.61.3",
61
- "@unocss/transformer-directives": "0.61.3"
57
+ "@unocss/core": "0.61.4",
58
+ "@unocss/inspector": "0.61.4",
59
+ "@unocss/scope": "0.61.4",
60
+ "@unocss/transformer-directives": "0.61.4",
61
+ "@unocss/config": "0.61.4"
62
62
  },
63
63
  "devDependencies": {
64
- "vite": "^5.3.3",
65
- "@unocss/shared-integration": "0.61.3"
64
+ "vite": "^5.3.4",
65
+ "@unocss/shared-integration": "0.61.4"
66
66
  },
67
67
  "scripts": {
68
68
  "build": "unbuild",