@unocss/config 0.47.2 → 0.47.3
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 +2 -2
- package/dist/index.mjs +2 -2
- package/package.json +2 -2
package/dist/index.cjs
CHANGED
|
@@ -13,7 +13,7 @@ const fs__default = /*#__PURE__*/_interopDefaultLegacy(fs);
|
|
|
13
13
|
async function loadConfig(cwd = process.cwd(), configOrPath = cwd, extraConfigSources = [], defaults = {}) {
|
|
14
14
|
let inlineConfig = {};
|
|
15
15
|
if (typeof configOrPath !== "string") {
|
|
16
|
-
inlineConfig =
|
|
16
|
+
inlineConfig = configOrPath;
|
|
17
17
|
if (inlineConfig.configFile === false) {
|
|
18
18
|
return {
|
|
19
19
|
config: inlineConfig,
|
|
@@ -48,7 +48,7 @@ async function loadConfig(cwd = process.cwd(), configOrPath = cwd, extraConfigSo
|
|
|
48
48
|
defaults: inlineConfig
|
|
49
49
|
});
|
|
50
50
|
const result = await loader.load();
|
|
51
|
-
result.config = result.config || inlineConfig;
|
|
51
|
+
result.config = Object.assign(defaults, result.config || inlineConfig);
|
|
52
52
|
if (result.config.configDeps) {
|
|
53
53
|
result.sources = [
|
|
54
54
|
...result.sources,
|
package/dist/index.mjs
CHANGED
|
@@ -5,7 +5,7 @@ import { createConfigLoader } from 'unconfig';
|
|
|
5
5
|
async function loadConfig(cwd = process.cwd(), configOrPath = cwd, extraConfigSources = [], defaults = {}) {
|
|
6
6
|
let inlineConfig = {};
|
|
7
7
|
if (typeof configOrPath !== "string") {
|
|
8
|
-
inlineConfig =
|
|
8
|
+
inlineConfig = configOrPath;
|
|
9
9
|
if (inlineConfig.configFile === false) {
|
|
10
10
|
return {
|
|
11
11
|
config: inlineConfig,
|
|
@@ -40,7 +40,7 @@ async function loadConfig(cwd = process.cwd(), configOrPath = cwd, extraConfigSo
|
|
|
40
40
|
defaults: inlineConfig
|
|
41
41
|
});
|
|
42
42
|
const result = await loader.load();
|
|
43
|
-
result.config = result.config || inlineConfig;
|
|
43
|
+
result.config = Object.assign(defaults, result.config || inlineConfig);
|
|
44
44
|
if (result.config.configDeps) {
|
|
45
45
|
result.sources = [
|
|
46
46
|
...result.sources,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@unocss/config",
|
|
3
|
-
"version": "0.47.
|
|
3
|
+
"version": "0.47.3",
|
|
4
4
|
"description": "Config loader for UnoCSS",
|
|
5
5
|
"author": "Anthony Fu <anthonyfu117@hotmail.com>",
|
|
6
6
|
"license": "MIT",
|
|
@@ -33,7 +33,7 @@
|
|
|
33
33
|
"node": ">=14"
|
|
34
34
|
},
|
|
35
35
|
"dependencies": {
|
|
36
|
-
"@unocss/core": "0.47.
|
|
36
|
+
"@unocss/core": "0.47.3",
|
|
37
37
|
"unconfig": "^0.3.7"
|
|
38
38
|
},
|
|
39
39
|
"scripts": {
|