@unocss/vite 0.57.2 → 0.57.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.
package/dist/index.cjs CHANGED
@@ -183,7 +183,9 @@ function createContext(configOrPath, defaults = {}, extraConfigSources = [], res
183
183
  uno,
184
184
  extract,
185
185
  getConfig,
186
- root,
186
+ get root() {
187
+ return root;
188
+ },
187
189
  updateRoot,
188
190
  getConfigFileList: () => configFileList
189
191
  };
@@ -338,6 +340,7 @@ async function setupContentExtractor(ctx, shouldWatch = false) {
338
340
  if (content?.filesystem) {
339
341
  const files = await fg__default(content.filesystem, { cwd: root });
340
342
  async function extractFile(file) {
343
+ file = node_path.isAbsolute(file) ? file : node_path.resolve(root, file);
341
344
  const code = await fs__default.readFile(file, "utf-8");
342
345
  if (!filter(code, file))
343
346
  return;
package/dist/index.mjs CHANGED
@@ -168,7 +168,9 @@ function createContext(configOrPath, defaults = {}, extraConfigSources = [], res
168
168
  uno,
169
169
  extract,
170
170
  getConfig,
171
- root,
171
+ get root() {
172
+ return root;
173
+ },
172
174
  updateRoot,
173
175
  getConfigFileList: () => configFileList
174
176
  };
@@ -323,6 +325,7 @@ async function setupContentExtractor(ctx, shouldWatch = false) {
323
325
  if (content?.filesystem) {
324
326
  const files = await fg(content.filesystem, { cwd: root });
325
327
  async function extractFile(file) {
328
+ file = isAbsolute(file) ? file : resolve(root, file);
326
329
  const code = await fs.readFile(file, "utf-8");
327
330
  if (!filter(code, file))
328
331
  return;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@unocss/vite",
3
- "version": "0.57.2",
3
+ "version": "0.57.4",
4
4
  "description": "The Vite plugin for UnoCSS",
5
5
  "author": "Anthony Fu <anthonyfu117@hotmail.com>",
6
6
  "license": "MIT",
@@ -45,17 +45,17 @@
45
45
  "@ampproject/remapping": "^2.2.1",
46
46
  "@rollup/pluginutils": "^5.0.5",
47
47
  "chokidar": "^3.5.3",
48
- "fast-glob": "^3.3.1",
48
+ "fast-glob": "^3.3.2",
49
49
  "magic-string": "^0.30.5",
50
- "@unocss/config": "0.57.2",
51
- "@unocss/core": "0.57.2",
52
- "@unocss/inspector": "0.57.2",
53
- "@unocss/scope": "0.57.2",
54
- "@unocss/transformer-directives": "0.57.2"
50
+ "@unocss/config": "0.57.4",
51
+ "@unocss/core": "0.57.4",
52
+ "@unocss/inspector": "0.57.4",
53
+ "@unocss/scope": "0.57.4",
54
+ "@unocss/transformer-directives": "0.57.4"
55
55
  },
56
56
  "devDependencies": {
57
57
  "vite": "^4.5.0",
58
- "@unocss/shared-integration": "0.57.2"
58
+ "@unocss/shared-integration": "0.57.4"
59
59
  },
60
60
  "scripts": {
61
61
  "build": "unbuild",