@umijs/core 4.0.13 → 4.0.16
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.
|
@@ -33,7 +33,7 @@ function defineRoutes(callback) {
|
|
|
33
33
|
const parentAbsPath = parentRoute == null ? void 0 : parentRoute.absPath;
|
|
34
34
|
const absPath = [parentAbsPath, opts.path].join("/");
|
|
35
35
|
const route = {
|
|
36
|
-
path:
|
|
36
|
+
path: absPath === "/" ? "/" : opts.path,
|
|
37
37
|
id: (0, import_utils.createRouteId)(opts.file),
|
|
38
38
|
parentId,
|
|
39
39
|
file: opts.file,
|
package/dist/service/service.js
CHANGED
|
@@ -185,11 +185,12 @@ var Service = class {
|
|
|
185
185
|
this.pkg = pkg;
|
|
186
186
|
this.pkgPath = pkgPath || (0, import_path.join)(this.cwd, "package.json");
|
|
187
187
|
const prefix = this.opts.frameworkName || import_constants.DEFAULT_FRAMEWORK_NAME;
|
|
188
|
+
const specifiedEnv = process.env[`${prefix}_ENV`.toUpperCase()];
|
|
188
189
|
const configManager = new import_config.Config({
|
|
189
190
|
cwd: this.cwd,
|
|
190
191
|
env: this.env,
|
|
191
192
|
defaultConfigFiles: this.opts.defaultConfigFiles,
|
|
192
|
-
specifiedEnv
|
|
193
|
+
specifiedEnv
|
|
193
194
|
});
|
|
194
195
|
this.configManager = configManager;
|
|
195
196
|
this.userConfig = configManager.getUserConfig().config;
|
|
@@ -283,7 +284,7 @@ var Service = class {
|
|
|
283
284
|
});
|
|
284
285
|
const defaultConfig = await this.applyPlugins({
|
|
285
286
|
key: "modifyDefaultConfig",
|
|
286
|
-
initialValue: this.configDefaults
|
|
287
|
+
initialValue: import_utils.lodash.cloneDeep(this.configDefaults)
|
|
287
288
|
});
|
|
288
289
|
this.config = import_utils.lodash.merge(defaultConfig, config);
|
|
289
290
|
return { config, defaultConfig };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@umijs/core",
|
|
3
|
-
"version": "4.0.
|
|
3
|
+
"version": "4.0.16",
|
|
4
4
|
"homepage": "https://github.com/umijs/umi/tree/master/packages/core#readme",
|
|
5
5
|
"bugs": "https://github.com/umijs/umi/issues",
|
|
6
6
|
"repository": {
|
|
@@ -21,8 +21,8 @@
|
|
|
21
21
|
"test": "umi-scripts jest-turbo"
|
|
22
22
|
},
|
|
23
23
|
"dependencies": {
|
|
24
|
-
"@umijs/bundler-utils": "4.0.
|
|
25
|
-
"@umijs/utils": "4.0.
|
|
24
|
+
"@umijs/bundler-utils": "4.0.16",
|
|
25
|
+
"@umijs/utils": "4.0.16"
|
|
26
26
|
},
|
|
27
27
|
"devDependencies": {
|
|
28
28
|
"dotenv": "16.0.0",
|