@unocss/vite 0.31.10 → 0.31.12

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
@@ -55,7 +55,6 @@ const CSS_PLACEHOLDER = "@unocss-placeholder";
55
55
  function createContext(configOrPath, defaults = {}, extraConfigSources = [], resolveConfigResult = () => {
56
56
  }) {
57
57
  let root = process.cwd();
58
- const loadConfig = config.createConfigLoader(configOrPath || root, extraConfigSources);
59
58
  let rawConfig = {};
60
59
  const uno = core.createGenerator(rawConfig, defaults);
61
60
  let rollupFilter = pluginutils.createFilter(defaultInclude, defaultExclude);
@@ -64,7 +63,7 @@ function createContext(configOrPath, defaults = {}, extraConfigSources = [], res
64
63
  const tokens = /* @__PURE__ */ new Set();
65
64
  let ready = reloadConfig();
66
65
  async function reloadConfig() {
67
- const result = await loadConfig(configOrPath || root);
66
+ const result = await config.loadConfig(root, configOrPath, extraConfigSources);
68
67
  resolveConfigResult(result);
69
68
  rawConfig = result.config;
70
69
  uno.setConfig(rawConfig);
package/dist/index.mjs CHANGED
@@ -1,6 +1,6 @@
1
1
  import UnocssInspector from '@unocss/inspector';
2
2
  import { createFilter } from '@rollup/pluginutils';
3
- import { createConfigLoader } from '@unocss/config';
3
+ import { loadConfig } from '@unocss/config';
4
4
  import { createGenerator, BetterMap, toEscapedSelector } from '@unocss/core';
5
5
  import { createHash } from 'crypto';
6
6
  import MagicString from 'magic-string';
@@ -45,7 +45,6 @@ const CSS_PLACEHOLDER = "@unocss-placeholder";
45
45
  function createContext(configOrPath, defaults = {}, extraConfigSources = [], resolveConfigResult = () => {
46
46
  }) {
47
47
  let root = process.cwd();
48
- const loadConfig = createConfigLoader(configOrPath || root, extraConfigSources);
49
48
  let rawConfig = {};
50
49
  const uno = createGenerator(rawConfig, defaults);
51
50
  let rollupFilter = createFilter(defaultInclude, defaultExclude);
@@ -54,7 +53,7 @@ function createContext(configOrPath, defaults = {}, extraConfigSources = [], res
54
53
  const tokens = /* @__PURE__ */ new Set();
55
54
  let ready = reloadConfig();
56
55
  async function reloadConfig() {
57
- const result = await loadConfig(configOrPath || root);
56
+ const result = await loadConfig(root, configOrPath, extraConfigSources);
58
57
  resolveConfigResult(result);
59
58
  rawConfig = result.config;
60
59
  uno.setConfig(rawConfig);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@unocss/vite",
3
- "version": "0.31.10",
3
+ "version": "0.31.12",
4
4
  "description": "The Vite plugin for UnoCSS",
5
5
  "keywords": [
6
6
  "unocss",
@@ -43,11 +43,11 @@
43
43
  },
44
44
  "dependencies": {
45
45
  "@rollup/pluginutils": "^4.2.1",
46
- "@unocss/config": "0.31.10",
47
- "@unocss/core": "0.31.10",
48
- "@unocss/inspector": "0.31.10",
49
- "@unocss/scope": "0.31.10",
50
- "@unocss/transformer-directives": "0.31.10",
46
+ "@unocss/config": "0.31.12",
47
+ "@unocss/core": "0.31.12",
48
+ "@unocss/inspector": "0.31.12",
49
+ "@unocss/scope": "0.31.12",
50
+ "@unocss/transformer-directives": "0.31.12",
51
51
  "magic-string": "^0.26.1"
52
52
  },
53
53
  "devDependencies": {