@uni_toolkit/vite-plugin-component-config 0.0.2 → 0.0.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 +2 -1
- package/dist/index.js +2 -1
- package/package.json +8 -3
package/dist/index.cjs
CHANGED
|
@@ -38,6 +38,7 @@ var import_pluginutils = require("@rollup/pluginutils");
|
|
|
38
38
|
var import_path = __toESM(require("path"), 1);
|
|
39
39
|
var import_fs = __toESM(require("fs"), 1);
|
|
40
40
|
var import_uni_cli_shared = require("@dcloudio/uni-cli-shared");
|
|
41
|
+
var import_lodash_es = require("lodash-es");
|
|
41
42
|
function vitePluginComponentConfig(options = {
|
|
42
43
|
include: ["**/*.{vue,nvue,uvue}"],
|
|
43
44
|
exclude: []
|
|
@@ -88,7 +89,7 @@ function vitePluginComponentConfig(options = {
|
|
|
88
89
|
const json = JSON.parse(content);
|
|
89
90
|
import_fs.default.writeFileSync(
|
|
90
91
|
outputPath,
|
|
91
|
-
JSON.stringify(
|
|
92
|
+
JSON.stringify((0, import_lodash_es.merge)(json, config), null, 2)
|
|
92
93
|
);
|
|
93
94
|
}
|
|
94
95
|
}
|
package/dist/index.js
CHANGED
|
@@ -4,6 +4,7 @@ import { createFilter } from "@rollup/pluginutils";
|
|
|
4
4
|
import path from "path";
|
|
5
5
|
import fs from "fs";
|
|
6
6
|
import { parseJson } from "@dcloudio/uni-cli-shared";
|
|
7
|
+
import { merge } from "lodash-es";
|
|
7
8
|
function vitePluginComponentConfig(options = {
|
|
8
9
|
include: ["**/*.{vue,nvue,uvue}"],
|
|
9
10
|
exclude: []
|
|
@@ -54,7 +55,7 @@ function vitePluginComponentConfig(options = {
|
|
|
54
55
|
const json = JSON.parse(content);
|
|
55
56
|
fs.writeFileSync(
|
|
56
57
|
outputPath,
|
|
57
|
-
JSON.stringify(
|
|
58
|
+
JSON.stringify(merge(json, config), null, 2)
|
|
58
59
|
);
|
|
59
60
|
}
|
|
60
61
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@uni_toolkit/vite-plugin-component-config",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.4",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"author": "chouchouji <1305974212@qq.com>",
|
|
6
6
|
"type": "module",
|
|
@@ -31,12 +31,17 @@
|
|
|
31
31
|
"@dcloudio/uni-cli-shared": "3.0.0-alpha-4080120250820001",
|
|
32
32
|
"vite": "^7.1.7",
|
|
33
33
|
"@rollup/pluginutils": "^5.3.0",
|
|
34
|
-
"
|
|
34
|
+
"lodash-es": "^4.17.21",
|
|
35
|
+
"@uni_toolkit/shared": "0.0.4"
|
|
35
36
|
},
|
|
36
37
|
"devDependencies": {
|
|
37
38
|
"typescript": "5.3.3",
|
|
38
39
|
"tsup": "7.2.0",
|
|
39
|
-
"@types/node": "^18.7.20"
|
|
40
|
+
"@types/node": "^18.7.20",
|
|
41
|
+
"@types/lodash-es": "^4.17.12"
|
|
42
|
+
},
|
|
43
|
+
"peerDependencies": {
|
|
44
|
+
"vite": "^5.0.0"
|
|
40
45
|
},
|
|
41
46
|
"scripts": {
|
|
42
47
|
"build": "tsup src/index.ts --format esm,cjs --out-dir=dist --dts --clean",
|