@unpackjs/core 1.0.1 → 1.2.0
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/config/index.cjs +4 -6
- package/dist/config/index.d.ts.map +1 -1
- package/dist/config/index.js +5 -6
- package/dist/index.cjs +1 -1
- package/dist/index.js +1 -1
- package/package.json +5 -5
package/dist/config/index.cjs
CHANGED
|
@@ -87,12 +87,10 @@ async function loadConfig({
|
|
|
87
87
|
if (cliOptions.doctor)
|
|
88
88
|
(0, import_shared.setValueByPath)(parsedUserConfig, ["performance", "doctor"], cliOptions.doctor);
|
|
89
89
|
let { plugins, bundlerConfig, ...rest } = merge(defaultConfig, parsedUserConfig);
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
rest = await plugin.config(rest, { mergeConfig: merge });
|
|
95
|
-
}
|
|
90
|
+
for (const plugin of (0, import_shared.getNormalizedPlugins)(plugins)) {
|
|
91
|
+
if (!plugin.config)
|
|
92
|
+
continue;
|
|
93
|
+
rest = await plugin.config(rest, { mergeConfig: merge });
|
|
96
94
|
}
|
|
97
95
|
return {
|
|
98
96
|
...rest,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/config/index.ts"],"names":[],"mappings":"AAEA,OAAO,EACL,KAAK,UAAU,EACf,KAAK,OAAO,EACZ,KAAK,OAAO,EACZ,KAAK,YAAY,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/config/index.ts"],"names":[],"mappings":"AAEA,OAAO,EACL,KAAK,UAAU,EACf,KAAK,OAAO,EACZ,KAAK,OAAO,EACZ,KAAK,YAAY,EAQlB,MAAM,kBAAkB,CAAA;AAIzB,wBAAsB,UAAU,CAAC,EAC/B,IAAI,EACJ,UAAU,GACX,EAAE;IACD,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,UAAU,CAAC,EAAE,UAAU,CAAA;CACxB,GAAG,OAAO,CAAC,YAAY,CAAC,CAwDxB;AAED,MAAM,MAAM,YAAY,GAAG;IACzB,GAAG,EAAE,OAAO,CAAA;IACZ,OAAO,EAAE,OAAO,CAAA;CACjB,CAAA;AAED,MAAM,MAAM,mBAAmB,GAAG,CAAC,MAAM,EAAE,YAAY,KAAK,OAAO,CAAC,YAAY,CAAC,CAAA;AACjF,MAAM,MAAM,kBAAkB,GAAG,CAAC,MAAM,EAAE,YAAY,KAAK,YAAY,CAAA;AACvE,MAAM,MAAM,kBAAkB,GAAG,YAAY,GAAG,kBAAkB,GAAG,mBAAmB,CAAA;AACxF,wBAAgB,YAAY,CAAC,MAAM,EAAE,YAAY,GAAG,YAAY,CAAA;AAChE,wBAAgB,YAAY,CAAC,MAAM,EAAE,kBAAkB,GAAG,kBAAkB,CAAA;AAC5E,wBAAgB,YAAY,CAAC,MAAM,EAAE,mBAAmB,GAAG,mBAAmB,CAAA;AAC9E,wBAAgB,YAAY,CAAC,MAAM,EAAE,kBAAkB,GAAG,kBAAkB,CAAA"}
|
package/dist/config/index.js
CHANGED
|
@@ -12,6 +12,7 @@ import { isAbsolute, join } from "node:path";
|
|
|
12
12
|
import {
|
|
13
13
|
bundleRequire,
|
|
14
14
|
getNodeEnv,
|
|
15
|
+
getNormalizedPlugins,
|
|
15
16
|
isDev,
|
|
16
17
|
isProd,
|
|
17
18
|
logger,
|
|
@@ -70,12 +71,10 @@ async function loadConfig({
|
|
|
70
71
|
if (cliOptions.doctor)
|
|
71
72
|
setValueByPath(parsedUserConfig, ["performance", "doctor"], cliOptions.doctor);
|
|
72
73
|
let { plugins, bundlerConfig, ...rest } = merge(defaultConfig, parsedUserConfig);
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
rest = await plugin.config(rest, { mergeConfig: merge });
|
|
78
|
-
}
|
|
74
|
+
for (const plugin of getNormalizedPlugins(plugins)) {
|
|
75
|
+
if (!plugin.config)
|
|
76
|
+
continue;
|
|
77
|
+
rest = await plugin.config(rest, { mergeConfig: merge });
|
|
79
78
|
}
|
|
80
79
|
return {
|
|
81
80
|
...rest,
|
package/dist/index.cjs
CHANGED
|
@@ -32,7 +32,7 @@ async function createService({ command, root, cliOptions }) {
|
|
|
32
32
|
if (!npm_execpath || npm_lifecycle_event === "npx" || npm_execpath.includes("npx-cli") || npm_execpath.includes(".bun") || npm_execpath.includes("yarn")) {
|
|
33
33
|
console.log();
|
|
34
34
|
}
|
|
35
|
-
console.log(chalk.bold(`Unpack v${"1.0
|
|
35
|
+
console.log(chalk.bold(`Unpack v${"1.2.0"}
|
|
36
36
|
`));
|
|
37
37
|
if (command === "build") {
|
|
38
38
|
(0, import_shared.setNodeEnv)(cliOptions.watch ? "development" : "production");
|
package/dist/index.js
CHANGED
|
@@ -21,7 +21,7 @@ async function createService({ command, root, cliOptions }) {
|
|
|
21
21
|
if (!npm_execpath || npm_lifecycle_event === "npx" || npm_execpath.includes("npx-cli") || npm_execpath.includes(".bun") || npm_execpath.includes("yarn")) {
|
|
22
22
|
console.log();
|
|
23
23
|
}
|
|
24
|
-
console.log(chalk.bold(`Unpack v${"1.0
|
|
24
|
+
console.log(chalk.bold(`Unpack v${"1.2.0"}
|
|
25
25
|
`));
|
|
26
26
|
if (command === "build") {
|
|
27
27
|
setNodeEnv(cliOptions.watch ? "development" : "production");
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@unpackjs/core",
|
|
3
|
-
"version": "1.0
|
|
3
|
+
"version": "1.2.0",
|
|
4
4
|
"description": "",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"exports": {
|
|
@@ -23,10 +23,10 @@
|
|
|
23
23
|
"access": "public"
|
|
24
24
|
},
|
|
25
25
|
"dependencies": {
|
|
26
|
-
"@unpackjs/bundler-rspack": "^1.0
|
|
27
|
-
"@unpackjs/bundler-webpack": "^1.0
|
|
28
|
-
"@unpackjs/shared": "^1.0
|
|
29
|
-
"@unpackjs/plugin-react": "^1.0
|
|
26
|
+
"@unpackjs/bundler-rspack": "^1.2.0",
|
|
27
|
+
"@unpackjs/bundler-webpack": "^1.2.0",
|
|
28
|
+
"@unpackjs/shared": "^1.2.0",
|
|
29
|
+
"@unpackjs/plugin-react": "^1.2.0"
|
|
30
30
|
},
|
|
31
31
|
"scripts": {
|
|
32
32
|
"dev": "modern build --watch",
|