@modern-js/plugin-server 1.20.1 → 1.21.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/CHANGELOG.md +11 -0
- package/dist/js/modern/cli.js +19 -1
- package/dist/js/node/cli.js +19 -1
- package/dist/js/treeshaking/cli.js +15 -5
- package/package.json +9 -9
package/CHANGELOG.md
CHANGED
@@ -1,5 +1,16 @@
|
|
1
1
|
# @modern-js/plugin-server
|
2
2
|
|
3
|
+
## 1.21.0
|
4
|
+
|
5
|
+
### Patch Changes
|
6
|
+
|
7
|
+
- cc3cab0: fix: modify the parameters passed to the compile function of server-utils
|
8
|
+
fix: 修改传入 server-utils 的 compile 函数的参数
|
9
|
+
- Updated dependencies [8f3674a]
|
10
|
+
- @modern-js/server-utils@1.21.0
|
11
|
+
- @modern-js/utils@1.21.0
|
12
|
+
- @modern-js/babel-compiler@1.21.0
|
13
|
+
|
3
14
|
## 1.20.1
|
4
15
|
|
5
16
|
### Patch Changes
|
package/dist/js/modern/cli.js
CHANGED
@@ -30,8 +30,26 @@ export default (() => ({
|
|
30
30
|
sourceDirs.push(sharedDir);
|
31
31
|
}
|
32
32
|
|
33
|
+
const {
|
34
|
+
server
|
35
|
+
} = modernConfig;
|
36
|
+
const {
|
37
|
+
alias,
|
38
|
+
envVars,
|
39
|
+
globalVars
|
40
|
+
} = modernConfig.source;
|
41
|
+
const {
|
42
|
+
babel
|
43
|
+
} = modernConfig.tools;
|
44
|
+
|
33
45
|
if (sourceDirs.length > 0) {
|
34
|
-
await compile(appDirectory,
|
46
|
+
await compile(appDirectory, {
|
47
|
+
server,
|
48
|
+
alias,
|
49
|
+
envVars,
|
50
|
+
globalVars,
|
51
|
+
babelConfig: babel
|
52
|
+
}, {
|
35
53
|
sourceDirs,
|
36
54
|
distDir,
|
37
55
|
tsconfigPath
|
package/dist/js/node/cli.js
CHANGED
@@ -49,8 +49,26 @@ var _default = () => ({
|
|
49
49
|
sourceDirs.push(sharedDir);
|
50
50
|
}
|
51
51
|
|
52
|
+
const {
|
53
|
+
server
|
54
|
+
} = modernConfig;
|
55
|
+
const {
|
56
|
+
alias,
|
57
|
+
envVars,
|
58
|
+
globalVars
|
59
|
+
} = modernConfig.source;
|
60
|
+
const {
|
61
|
+
babel
|
62
|
+
} = modernConfig.tools;
|
63
|
+
|
52
64
|
if (sourceDirs.length > 0) {
|
53
|
-
await (0, _serverUtils.compile)(appDirectory,
|
65
|
+
await (0, _serverUtils.compile)(appDirectory, {
|
66
|
+
server,
|
67
|
+
alias,
|
68
|
+
envVars,
|
69
|
+
globalVars,
|
70
|
+
babelConfig: babel
|
71
|
+
}, {
|
54
72
|
sourceDirs,
|
55
73
|
distDir,
|
56
74
|
tsconfigPath
|
@@ -15,7 +15,7 @@ export default (function () {
|
|
15
15
|
},
|
16
16
|
afterBuild: function afterBuild() {
|
17
17
|
return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
|
18
|
-
var _api$useAppContext, appDirectory, distDirectory, modernConfig, distDir, serverDir, sharedDir, tsconfigPath, sourceDirs;
|
18
|
+
var _api$useAppContext, appDirectory, distDirectory, modernConfig, distDir, serverDir, sharedDir, tsconfigPath, sourceDirs, server, _modernConfig$source, alias, envVars, globalVars, babel;
|
19
19
|
|
20
20
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
21
21
|
while (1) {
|
@@ -37,19 +37,29 @@ export default (function () {
|
|
37
37
|
sourceDirs.push(sharedDir);
|
38
38
|
}
|
39
39
|
|
40
|
+
server = modernConfig.server;
|
41
|
+
_modernConfig$source = modernConfig.source, alias = _modernConfig$source.alias, envVars = _modernConfig$source.envVars, globalVars = _modernConfig$source.globalVars;
|
42
|
+
babel = modernConfig.tools.babel;
|
43
|
+
|
40
44
|
if (!(sourceDirs.length > 0)) {
|
41
|
-
_context.next =
|
45
|
+
_context.next = 15;
|
42
46
|
break;
|
43
47
|
}
|
44
48
|
|
45
|
-
_context.next =
|
46
|
-
return compile(appDirectory,
|
49
|
+
_context.next = 15;
|
50
|
+
return compile(appDirectory, {
|
51
|
+
server: server,
|
52
|
+
alias: alias,
|
53
|
+
envVars: envVars,
|
54
|
+
globalVars: globalVars,
|
55
|
+
babelConfig: babel
|
56
|
+
}, {
|
47
57
|
sourceDirs: sourceDirs,
|
48
58
|
distDir: distDir,
|
49
59
|
tsconfigPath: tsconfigPath
|
50
60
|
});
|
51
61
|
|
52
|
-
case
|
62
|
+
case 15:
|
53
63
|
case "end":
|
54
64
|
return _context.stop();
|
55
65
|
}
|
package/package.json
CHANGED
@@ -11,7 +11,7 @@
|
|
11
11
|
"modern",
|
12
12
|
"modern.js"
|
13
13
|
],
|
14
|
-
"version": "1.
|
14
|
+
"version": "1.21.0",
|
15
15
|
"types": "./dist/types/server.d.ts",
|
16
16
|
"jsnext:source": "./src/server.ts",
|
17
17
|
"main": "./dist/js/node/server.js",
|
@@ -48,20 +48,20 @@
|
|
48
48
|
},
|
49
49
|
"dependencies": {
|
50
50
|
"@babel/runtime": "^7.18.0",
|
51
|
-
"@modern-js/babel-compiler": "1.
|
52
|
-
"@modern-js/server-utils": "1.
|
53
|
-
"@modern-js/utils": "1.
|
51
|
+
"@modern-js/babel-compiler": "1.21.0",
|
52
|
+
"@modern-js/server-utils": "1.21.0",
|
53
|
+
"@modern-js/utils": "1.21.0"
|
54
54
|
},
|
55
55
|
"devDependencies": {
|
56
|
-
"@modern-js/server-core": "1.
|
57
|
-
"@modern-js/core": "1.
|
58
|
-
"@scripts/build": "1.
|
59
|
-
"@modern-js/types": "1.
|
56
|
+
"@modern-js/server-core": "1.21.0",
|
57
|
+
"@modern-js/core": "1.21.0",
|
58
|
+
"@scripts/build": "1.21.0",
|
59
|
+
"@modern-js/types": "1.21.0",
|
60
60
|
"typescript": "^4",
|
61
61
|
"@types/jest": "^27",
|
62
62
|
"@types/node": "^14",
|
63
63
|
"jest": "^27",
|
64
|
-
"@scripts/jest-config": "1.
|
64
|
+
"@scripts/jest-config": "1.21.0"
|
65
65
|
},
|
66
66
|
"sideEffects": [
|
67
67
|
"*.css",
|