@modern-js/core 1.11.1 → 1.11.2
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/CHANGELOG.md +14 -0
- package/dist/bin.js +12 -3
- package/dist/config/mergeConfig.js +4 -1
- package/dist/config/types/index.d.ts +8 -6
- package/package.json +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,19 @@
|
|
|
1
1
|
# @modern-js/core
|
|
2
2
|
|
|
3
|
+
## 1.11.2
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 8d508c6ed: feat(devServer): support disable hmr or live reload
|
|
8
|
+
- 0eff2473c: ignore devServer config fn merge
|
|
9
|
+
- f25d6a62e: fix: change bffConfig type define to interface
|
|
10
|
+
- a18926bbd: fix(app-tools): dev --config not working
|
|
11
|
+
- 8f7c0f898: feat(app-tools): support specify config file in build and deploy command
|
|
12
|
+
- Updated dependencies [a1198d509]
|
|
13
|
+
- Updated dependencies [a18926bbd]
|
|
14
|
+
- @modern-js/load-config@1.3.4
|
|
15
|
+
- @modern-js/plugin@1.3.6
|
|
16
|
+
|
|
3
17
|
## 1.11.1
|
|
4
18
|
|
|
5
19
|
### Patch Changes
|
package/dist/bin.js
CHANGED
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
"use strict";
|
|
3
|
+
/* eslint-disable-next-line eslint-comments/disable-enable-pair */
|
|
4
|
+
/* eslint-disable import/first */
|
|
3
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
6
|
require('../compiled/v8-compile-cache');
|
|
5
|
-
|
|
7
|
+
const utils_1 = require("@modern-js/utils");
|
|
6
8
|
const _1 = require(".");
|
|
9
|
+
const command = process.argv[2];
|
|
7
10
|
if (!process.env.NODE_ENV) {
|
|
8
|
-
const command = process.argv[2];
|
|
9
11
|
if (['build', 'start', 'deploy'].includes(command)) {
|
|
10
12
|
process.env.NODE_ENV = 'production';
|
|
11
13
|
}
|
|
@@ -17,4 +19,11 @@ if (!process.env.NODE_ENV) {
|
|
|
17
19
|
}
|
|
18
20
|
}
|
|
19
21
|
const { version } = require('../package.json');
|
|
20
|
-
|
|
22
|
+
const cliParams = (0, utils_1.minimist)(process.argv.slice(2));
|
|
23
|
+
const runOptions = {
|
|
24
|
+
version,
|
|
25
|
+
};
|
|
26
|
+
if (['dev', 'build', 'deploy'].includes(command) && cliParams.config) {
|
|
27
|
+
runOptions.configFile = cliParams.config;
|
|
28
|
+
}
|
|
29
|
+
_1.cli.run(process.argv.slice(2), runOptions);
|
|
@@ -11,7 +11,10 @@ const utils_1 = require("@modern-js/utils");
|
|
|
11
11
|
*/
|
|
12
12
|
const mergeConfig = (configs) => (0, lodash_1.mergeWith)({}, ...configs, (target, source, key) => {
|
|
13
13
|
// Do not use the following merge logic for source.designSystem and tools.tailwind(css)
|
|
14
|
-
if (key === 'designSystem' ||
|
|
14
|
+
if (key === 'designSystem' ||
|
|
15
|
+
key === 'tailwind' ||
|
|
16
|
+
key === 'tailwindcss' ||
|
|
17
|
+
key === 'devServer') {
|
|
15
18
|
return (0, lodash_1.mergeWith)({}, target !== null && target !== void 0 ? target : {}, source !== null && source !== void 0 ? source : {});
|
|
16
19
|
}
|
|
17
20
|
if (Array.isArray(target)) {
|
|
@@ -142,6 +142,8 @@ export interface DeployConfig {
|
|
|
142
142
|
declare type ConfigFunction = Record<string, unknown> | ((config: Record<string, unknown>, utils?: any) => Record<string, unknown> | void);
|
|
143
143
|
export declare type RequestHandler = (req: IncomingMessage, res: ServerResponse, next: NextFunction) => void;
|
|
144
144
|
export declare type DevServerConfig = {
|
|
145
|
+
hot?: boolean;
|
|
146
|
+
liveReload?: boolean;
|
|
145
147
|
proxy?: BffProxyOptions;
|
|
146
148
|
headers?: Record<string, string>;
|
|
147
149
|
before?: RequestHandler[];
|
|
@@ -215,12 +217,12 @@ export interface RuntimeConfig {
|
|
|
215
217
|
export interface RuntimeByEntriesConfig {
|
|
216
218
|
[name: string]: RuntimeConfig;
|
|
217
219
|
}
|
|
218
|
-
export
|
|
219
|
-
prefix
|
|
220
|
-
requestCreator
|
|
221
|
-
fetcher
|
|
222
|
-
proxy
|
|
223
|
-
}
|
|
220
|
+
export interface BffConfig {
|
|
221
|
+
prefix?: string;
|
|
222
|
+
requestCreator?: string;
|
|
223
|
+
fetcher?: string;
|
|
224
|
+
proxy?: Record<string, any>;
|
|
225
|
+
}
|
|
224
226
|
export interface UserConfig {
|
|
225
227
|
source?: SourceConfig;
|
|
226
228
|
output?: OutputConfig;
|
package/package.json
CHANGED
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
"modern",
|
|
12
12
|
"modern.js"
|
|
13
13
|
],
|
|
14
|
-
"version": "1.11.
|
|
14
|
+
"version": "1.11.2",
|
|
15
15
|
"jsnext:source": "./src/index.ts",
|
|
16
16
|
"types": "./dist/index.d.ts",
|
|
17
17
|
"main": "./dist/index.js",
|
|
@@ -39,8 +39,8 @@
|
|
|
39
39
|
}
|
|
40
40
|
},
|
|
41
41
|
"dependencies": {
|
|
42
|
-
"@modern-js/load-config": "^1.3.
|
|
43
|
-
"@modern-js/plugin": "^1.3.
|
|
42
|
+
"@modern-js/load-config": "^1.3.4",
|
|
43
|
+
"@modern-js/plugin": "^1.3.6",
|
|
44
44
|
"@modern-js/utils": "^1.7.6"
|
|
45
45
|
},
|
|
46
46
|
"devDependencies": {
|