@modern-js/plugin-server-build 1.0.0-rc.2 → 1.0.0-rc.20
Sign up to get free protection for your applications and to get access to all the features.
- package/CHANGELOG.md +255 -0
- package/README.md +14 -22
- package/dist/js/modern/index.js +5 -9
- package/dist/js/node/index.js +10 -14
- package/package.json +15 -8
- package/src/index.ts +4 -6
package/CHANGELOG.md
ADDED
@@ -0,0 +1,255 @@
|
|
1
|
+
# @modern-js/plugin-server-build
|
2
|
+
|
3
|
+
## 1.0.0-rc.20
|
4
|
+
|
5
|
+
### Patch Changes
|
6
|
+
|
7
|
+
- 224f7fe: fix server route match
|
8
|
+
- 30ac27c: feat: add generator package description
|
9
|
+
- feat: fix bugs
|
10
|
+
- 204c626: feat: initial
|
11
|
+
- 63be0a5: fix: #118 #104
|
12
|
+
- Updated dependencies [224f7fe]
|
13
|
+
- Updated dependencies [30ac27c]
|
14
|
+
- Updated dependencies [undefined]
|
15
|
+
- Updated dependencies [204c626]
|
16
|
+
- Updated dependencies [63be0a5]
|
17
|
+
- @modern-js/core@1.0.0-rc.20
|
18
|
+
- @modern-js/server-utils@1.0.0-rc.20
|
19
|
+
- @modern-js/babel-compiler@1.0.0-rc.20
|
20
|
+
- @modern-js/utils@1.0.0-rc.20
|
21
|
+
|
22
|
+
## 1.0.0-rc.19
|
23
|
+
|
24
|
+
### Patch Changes
|
25
|
+
|
26
|
+
- 224f7fe: fix server route match
|
27
|
+
- 30ac27c: feat: add generator package description
|
28
|
+
- 204c626: feat: initial
|
29
|
+
- 63be0a5: fix: #118 #104
|
30
|
+
- Updated dependencies [224f7fe]
|
31
|
+
- Updated dependencies [30ac27c]
|
32
|
+
- Updated dependencies [204c626]
|
33
|
+
- Updated dependencies [63be0a5]
|
34
|
+
- @modern-js/core@1.0.0-rc.19
|
35
|
+
- @modern-js/server-utils@1.0.0-rc.19
|
36
|
+
- @modern-js/babel-compiler@1.0.0-rc.19
|
37
|
+
- @modern-js/utils@1.0.0-rc.19
|
38
|
+
|
39
|
+
## 1.0.0-rc.18
|
40
|
+
|
41
|
+
### Patch Changes
|
42
|
+
|
43
|
+
- 224f7fe: fix server route match
|
44
|
+
- 30ac27c: feat: add generator package description
|
45
|
+
- 204c626: feat: initial
|
46
|
+
- 63be0a5: fix: #118 #104
|
47
|
+
- Updated dependencies [224f7fe]
|
48
|
+
- Updated dependencies [30ac27c]
|
49
|
+
- Updated dependencies [204c626]
|
50
|
+
- Updated dependencies [63be0a5]
|
51
|
+
- @modern-js/core@1.0.0-rc.18
|
52
|
+
- @modern-js/server-utils@1.0.0-rc.18
|
53
|
+
- @modern-js/babel-compiler@1.0.0-rc.18
|
54
|
+
- @modern-js/utils@1.0.0-rc.18
|
55
|
+
|
56
|
+
## 1.0.0-rc.17
|
57
|
+
|
58
|
+
### Patch Changes
|
59
|
+
|
60
|
+
- 224f7fe: fix server route match
|
61
|
+
- 30ac27c: feat: add generator package description
|
62
|
+
- 204c626: feat: initial
|
63
|
+
- fix: #118 #104
|
64
|
+
- Updated dependencies [224f7fe]
|
65
|
+
- Updated dependencies [30ac27c]
|
66
|
+
- Updated dependencies [204c626]
|
67
|
+
- Updated dependencies [undefined]
|
68
|
+
- @modern-js/core@1.0.0-rc.17
|
69
|
+
- @modern-js/server-utils@1.0.0-rc.17
|
70
|
+
- @modern-js/babel-compiler@1.0.0-rc.17
|
71
|
+
- @modern-js/utils@1.0.0-rc.17
|
72
|
+
|
73
|
+
## 1.0.0-rc.16
|
74
|
+
|
75
|
+
### Patch Changes
|
76
|
+
|
77
|
+
- 224f7fe: fix server route match
|
78
|
+
- 30ac27c: feat: add generator package description
|
79
|
+
- 204c626: feat: initial
|
80
|
+
- Updated dependencies [224f7fe]
|
81
|
+
- Updated dependencies [30ac27c]
|
82
|
+
- Updated dependencies [204c626]
|
83
|
+
- @modern-js/core@1.0.0-rc.16
|
84
|
+
- @modern-js/server-utils@1.0.0-rc.16
|
85
|
+
- @modern-js/babel-compiler@1.0.0-rc.16
|
86
|
+
- @modern-js/utils@1.0.0-rc.16
|
87
|
+
|
88
|
+
## 1.0.0-rc.15
|
89
|
+
|
90
|
+
### Patch Changes
|
91
|
+
|
92
|
+
- 224f7fe: fix server route match
|
93
|
+
- 30ac27c: feat: add generator package description
|
94
|
+
- 204c626: feat: initial
|
95
|
+
- Updated dependencies [224f7fe]
|
96
|
+
- Updated dependencies [30ac27c]
|
97
|
+
- Updated dependencies [204c626]
|
98
|
+
- @modern-js/core@1.0.0-rc.15
|
99
|
+
- @modern-js/server-utils@1.0.0-rc.15
|
100
|
+
- @modern-js/babel-compiler@1.0.0-rc.15
|
101
|
+
- @modern-js/utils@1.0.0-rc.15
|
102
|
+
|
103
|
+
## 1.0.0-rc.14
|
104
|
+
|
105
|
+
### Patch Changes
|
106
|
+
|
107
|
+
- 224f7fe: fix server route match
|
108
|
+
- 204c626: feat: initial
|
109
|
+
- Updated dependencies [224f7fe]
|
110
|
+
- Updated dependencies [204c626]
|
111
|
+
- @modern-js/core@1.0.0-rc.14
|
112
|
+
- @modern-js/server-utils@1.0.0-rc.14
|
113
|
+
- @modern-js/babel-compiler@1.0.0-rc.14
|
114
|
+
- @modern-js/utils@1.0.0-rc.14
|
115
|
+
|
116
|
+
## 1.0.0-rc.13
|
117
|
+
|
118
|
+
### Patch Changes
|
119
|
+
|
120
|
+
- 224f7fe: fix server route match
|
121
|
+
- 204c626: feat: initial
|
122
|
+
- Updated dependencies [224f7fe]
|
123
|
+
- Updated dependencies [204c626]
|
124
|
+
- @modern-js/core@1.0.0-rc.13
|
125
|
+
- @modern-js/server-utils@1.0.0-rc.13
|
126
|
+
- @modern-js/babel-compiler@1.0.0-rc.13
|
127
|
+
- @modern-js/utils@1.0.0-rc.13
|
128
|
+
|
129
|
+
## 1.0.0-rc.12
|
130
|
+
|
131
|
+
### Patch Changes
|
132
|
+
|
133
|
+
- 224f7fe: fix server route match
|
134
|
+
- 204c626: feat: initial
|
135
|
+
- Updated dependencies [224f7fe]
|
136
|
+
- Updated dependencies [204c626]
|
137
|
+
- @modern-js/core@1.0.0-rc.12
|
138
|
+
- @modern-js/server-utils@1.0.0-rc.12
|
139
|
+
- @modern-js/babel-compiler@1.0.0-rc.12
|
140
|
+
- @modern-js/utils@1.0.0-rc.12
|
141
|
+
|
142
|
+
## 1.0.0-rc.11
|
143
|
+
|
144
|
+
### Patch Changes
|
145
|
+
|
146
|
+
- 224f7fe: fix server route match
|
147
|
+
- 204c626: feat: initial
|
148
|
+
- Updated dependencies [224f7fe]
|
149
|
+
- Updated dependencies [204c626]
|
150
|
+
- @modern-js/core@1.0.0-rc.11
|
151
|
+
- @modern-js/server-utils@1.0.0-rc.11
|
152
|
+
- @modern-js/babel-compiler@1.0.0-rc.11
|
153
|
+
- @modern-js/utils@1.0.0-rc.11
|
154
|
+
|
155
|
+
## 1.0.0-rc.10
|
156
|
+
|
157
|
+
### Patch Changes
|
158
|
+
|
159
|
+
- 224f7fe: fix server route match
|
160
|
+
- 204c626: feat: initial
|
161
|
+
- Updated dependencies [224f7fe]
|
162
|
+
- Updated dependencies [204c626]
|
163
|
+
- @modern-js/core@1.0.0-rc.10
|
164
|
+
- @modern-js/server-utils@1.0.0-rc.10
|
165
|
+
- @modern-js/babel-compiler@1.0.0-rc.10
|
166
|
+
- @modern-js/utils@1.0.0-rc.10
|
167
|
+
|
168
|
+
## 1.0.0-rc.9
|
169
|
+
|
170
|
+
### Patch Changes
|
171
|
+
|
172
|
+
- 224f7fe: fix server route match
|
173
|
+
- 204c626: feat: initial
|
174
|
+
- Updated dependencies [224f7fe]
|
175
|
+
- Updated dependencies [204c626]
|
176
|
+
- @modern-js/core@1.0.0-rc.9
|
177
|
+
- @modern-js/server-utils@1.0.0-rc.9
|
178
|
+
- @modern-js/babel-compiler@1.0.0-rc.9
|
179
|
+
- @modern-js/utils@1.0.0-rc.9
|
180
|
+
|
181
|
+
## 1.0.0-rc.8
|
182
|
+
|
183
|
+
### Patch Changes
|
184
|
+
|
185
|
+
- 224f7fe: fix server route match
|
186
|
+
- 204c626: feat: initial
|
187
|
+
- Updated dependencies [224f7fe]
|
188
|
+
- Updated dependencies [204c626]
|
189
|
+
- @modern-js/core@1.0.0-rc.8
|
190
|
+
- @modern-js/server-utils@1.0.0-rc.8
|
191
|
+
- @modern-js/babel-compiler@1.0.0-rc.8
|
192
|
+
- @modern-js/utils@1.0.0-rc.8
|
193
|
+
|
194
|
+
## 1.0.0-rc.7
|
195
|
+
|
196
|
+
### Patch Changes
|
197
|
+
|
198
|
+
- 224f7fe: fix server route match
|
199
|
+
- 204c626: feat: initial
|
200
|
+
- Updated dependencies [224f7fe]
|
201
|
+
- Updated dependencies [204c626]
|
202
|
+
- @modern-js/core@1.0.0-rc.7
|
203
|
+
- @modern-js/server-utils@1.0.0-rc.7
|
204
|
+
- @modern-js/babel-compiler@1.0.0-rc.7
|
205
|
+
- @modern-js/utils@1.0.0-rc.7
|
206
|
+
|
207
|
+
## 1.0.0-rc.6
|
208
|
+
|
209
|
+
### Patch Changes
|
210
|
+
|
211
|
+
- 224f7fe: fix server route match
|
212
|
+
- 204c626: feat: initial
|
213
|
+
- Updated dependencies [224f7fe]
|
214
|
+
- Updated dependencies [204c626]
|
215
|
+
- @modern-js/core@1.0.0-rc.6
|
216
|
+
- @modern-js/server-utils@1.0.0-rc.6
|
217
|
+
- @modern-js/babel-compiler@1.0.0-rc.6
|
218
|
+
- @modern-js/utils@1.0.0-rc.6
|
219
|
+
|
220
|
+
## 1.0.0-rc.5
|
221
|
+
|
222
|
+
### Patch Changes
|
223
|
+
|
224
|
+
- 224f7fe: fix server route match
|
225
|
+
- 204c626: feat: initial
|
226
|
+
- Updated dependencies [224f7fe]
|
227
|
+
- Updated dependencies [204c626]
|
228
|
+
- @modern-js/core@1.0.0-rc.5
|
229
|
+
- @modern-js/server-utils@1.0.0-rc.5
|
230
|
+
- @modern-js/babel-compiler@1.0.0-rc.5
|
231
|
+
- @modern-js/utils@1.0.0-rc.5
|
232
|
+
|
233
|
+
## 1.0.0-rc.4
|
234
|
+
|
235
|
+
### Patch Changes
|
236
|
+
|
237
|
+
- fix server route match
|
238
|
+
- 204c626: feat: initial
|
239
|
+
- Updated dependencies [undefined]
|
240
|
+
- Updated dependencies [204c626]
|
241
|
+
- @modern-js/core@1.0.0-rc.4
|
242
|
+
- @modern-js/server-utils@1.0.0-rc.4
|
243
|
+
- @modern-js/babel-compiler@1.0.0-rc.4
|
244
|
+
- @modern-js/utils@1.0.0-rc.4
|
245
|
+
|
246
|
+
## 1.0.0-rc.3
|
247
|
+
|
248
|
+
### Patch Changes
|
249
|
+
|
250
|
+
- feat: initial
|
251
|
+
- Updated dependencies [undefined]
|
252
|
+
- @modern-js/core@1.0.0-rc.3
|
253
|
+
- @modern-js/server-utils@1.0.0-rc.3
|
254
|
+
- @modern-js/babel-compiler@1.0.0-rc.3
|
255
|
+
- @modern-js/utils@1.0.0-rc.3
|
package/README.md
CHANGED
@@ -1,32 +1,24 @@
|
|
1
1
|
|
2
2
|
<p align="center">
|
3
|
-
<a href="https://modernjs.dev" target="blank"><img src="https://lf3-static.bytednsdoc.com/obj/eden-cn/ylaelkeh7nuhfnuhf/modernjs.png" width="300" alt="Modern.js Logo" /></a>
|
3
|
+
<a href="https://modernjs.dev" target="blank"><img src="https://lf3-static.bytednsdoc.com/obj/eden-cn/ylaelkeh7nuhfnuhf/modernjs-cover.png" width="300" alt="Modern.js Logo" /></a>
|
4
|
+
</p>
|
5
|
+
|
6
|
+
<p align="center">
|
7
|
+
现代 Web 工程体系
|
8
|
+
<br/>
|
9
|
+
<a href="https://modernjs.dev" target="blank">
|
10
|
+
modernjs.dev
|
11
|
+
</a>
|
4
12
|
</p>
|
5
13
|
|
6
|
-
<p align="center">现代 Web 工程体系</p>
|
7
14
|
|
8
|
-
##
|
15
|
+
## 参考链接
|
9
16
|
- [迈入现代 Web 开发](https://zhuanlan.zhihu.com/p/386607009)
|
10
17
|
- [现代 Web 开发者问卷调查报告](https://zhuanlan.zhihu.com/p/403206195)
|
18
|
+
- [字节跳动是如何落地微前端的](https://mp.weixin.qq.com/s/L9wbfNG5fTXF5bx7dcgj4Q)
|
11
19
|
|
12
|
-
##
|
13
|
-
|
14
|
-
Modern.js 的 1.0.0.rc 版已经发到 npm,目前在做测试改进,README 文档之后统一提供(现阶段加入测试和开发,可以发 [issue](https://github.com/modern-js-dev/modern.js/issues) 留微信联系),完整的文档站计划在10月14日上线
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
20
|
+
## 近期计划
|
31
21
|
|
22
|
+
Modern.js 的 1.0.0.rc 版已经发到 npm,目前在做测试改进和文档建设。
|
32
23
|
|
24
|
+
README、完整的文档站、介绍等,都计划在 10 月 27 日上线。
|
package/dist/js/modern/index.js
CHANGED
@@ -1,5 +1,5 @@
|
|
1
|
-
import path from 'path';
|
2
1
|
import fs from 'fs';
|
2
|
+
import { path } from '@modern-js/utils';
|
3
3
|
import { createPlugin, useAppContext, useResolvedConfigContext } from '@modern-js/core';
|
4
4
|
import { compiler } from '@modern-js/babel-compiler';
|
5
5
|
import { resolveBabelConfig } from '@modern-js/server-utils';
|
@@ -43,17 +43,13 @@ export default createPlugin(() => ({
|
|
43
43
|
},
|
44
44
|
|
45
45
|
async afterBuild() {
|
46
|
+
// eslint-disable-next-line react-hooks/rules-of-hooks
|
46
47
|
const {
|
47
|
-
|
48
|
-
|
49
|
-
distDirectory
|
50
|
-
} // eslint-disable-next-line react-hooks/rules-of-hooks
|
51
|
-
|
48
|
+
appDirectory,
|
49
|
+
distDirectory
|
52
50
|
} = useAppContext(); // eslint-disable-next-line react-hooks/rules-of-hooks
|
53
51
|
|
54
|
-
const
|
55
|
-
value: modernConfig
|
56
|
-
} = useResolvedConfigContext();
|
52
|
+
const modernConfig = useResolvedConfigContext();
|
57
53
|
const distDir = path.resolve(distDirectory);
|
58
54
|
const serverDir = path.resolve(appDirectory, SERVER_DIR);
|
59
55
|
const sharedDir = path.resolve(appDirectory, SHARED_DIR);
|
package/dist/js/node/index.js
CHANGED
@@ -5,10 +5,10 @@ Object.defineProperty(exports, "__esModule", {
|
|
5
5
|
});
|
6
6
|
exports.default = void 0;
|
7
7
|
|
8
|
-
var _path = _interopRequireDefault(require("path"));
|
9
|
-
|
10
8
|
var _fs = _interopRequireDefault(require("fs"));
|
11
9
|
|
10
|
+
var _utils = require("@modern-js/utils");
|
11
|
+
|
12
12
|
var _core = require("@modern-js/core");
|
13
13
|
|
14
14
|
var _babelCompiler = require("@modern-js/babel-compiler");
|
@@ -57,25 +57,21 @@ var _default = (0, _core.createPlugin)(() => ({
|
|
57
57
|
},
|
58
58
|
|
59
59
|
async afterBuild() {
|
60
|
+
// eslint-disable-next-line react-hooks/rules-of-hooks
|
60
61
|
const {
|
61
|
-
|
62
|
-
|
63
|
-
distDirectory
|
64
|
-
} // eslint-disable-next-line react-hooks/rules-of-hooks
|
65
|
-
|
62
|
+
appDirectory,
|
63
|
+
distDirectory
|
66
64
|
} = (0, _core.useAppContext)(); // eslint-disable-next-line react-hooks/rules-of-hooks
|
67
65
|
|
68
|
-
const
|
69
|
-
value: modernConfig
|
70
|
-
} = (0, _core.useResolvedConfigContext)();
|
66
|
+
const modernConfig = (0, _core.useResolvedConfigContext)();
|
71
67
|
|
72
|
-
const distDir =
|
68
|
+
const distDir = _utils.path.resolve(distDirectory);
|
73
69
|
|
74
|
-
const serverDir =
|
70
|
+
const serverDir = _utils.path.resolve(appDirectory, SERVER_DIR);
|
75
71
|
|
76
|
-
const sharedDir =
|
72
|
+
const sharedDir = _utils.path.resolve(appDirectory, SHARED_DIR);
|
77
73
|
|
78
|
-
const tsconfigPath =
|
74
|
+
const tsconfigPath = _utils.path.resolve(appDirectory, TS_CONFIG_FILENAME);
|
79
75
|
|
80
76
|
const patterns = [];
|
81
77
|
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@modern-js/plugin-server-build",
|
3
|
-
"version": "1.0.0-rc.
|
3
|
+
"version": "1.0.0-rc.20",
|
4
4
|
"jsnext:source": "./src/index.ts",
|
5
5
|
"types": "./dist/types/index.d.ts",
|
6
6
|
"main": "./dist/js/node/index.js",
|
@@ -17,22 +17,25 @@
|
|
17
17
|
},
|
18
18
|
"dependencies": {
|
19
19
|
"@babel/runtime": "^7",
|
20
|
-
"@modern-js/babel-compiler": "^1.0.0-rc.
|
21
|
-
"@modern-js/
|
22
|
-
"@modern-js/
|
23
|
-
"@modern-js/utils": "^1.0.0-rc.2",
|
20
|
+
"@modern-js/babel-compiler": "^1.0.0-rc.20",
|
21
|
+
"@modern-js/server-utils": "^1.0.0-rc.20",
|
22
|
+
"@modern-js/utils": "^1.0.0-rc.20",
|
24
23
|
"globby": "^12.0.2",
|
25
24
|
"json5": "^2.2.0"
|
26
25
|
},
|
27
26
|
"devDependencies": {
|
28
|
-
"@modern-js/plugin-analyze": "^1.0.0-rc.
|
27
|
+
"@modern-js/plugin-analyze": "^1.0.0-rc.20",
|
29
28
|
"@types/babel__core": "^7.1.15",
|
30
29
|
"@types/jest": "^26",
|
31
30
|
"@types/node": "^14",
|
32
31
|
"ts-jest": "^27.0.5",
|
33
32
|
"typescript": "^4",
|
34
|
-
"@modern-js/
|
35
|
-
"@modern-js/
|
33
|
+
"@modern-js/core": "^1.0.0-rc.20",
|
34
|
+
"@modern-js/plugin-testing": "^1.0.0-rc.20",
|
35
|
+
"@modern-js/module-tools": "^1.0.0-rc.20"
|
36
|
+
},
|
37
|
+
"peerDependencies": {
|
38
|
+
"@modern-js/core": "^1.0.0-rc.20"
|
36
39
|
},
|
37
40
|
"sideEffects": false,
|
38
41
|
"modernConfig": {
|
@@ -40,6 +43,10 @@
|
|
40
43
|
"packageMode": "node-js"
|
41
44
|
}
|
42
45
|
},
|
46
|
+
"publishConfig": {
|
47
|
+
"registry": "https://registry.npmjs.org/",
|
48
|
+
"access": "public"
|
49
|
+
},
|
43
50
|
"scripts": {
|
44
51
|
"new": "modern new",
|
45
52
|
"build": "modern build",
|
package/src/index.ts
CHANGED
@@ -1,5 +1,5 @@
|
|
1
|
-
import path from 'path';
|
2
1
|
import fs from 'fs';
|
2
|
+
import { path } from '@modern-js/utils';
|
3
3
|
import {
|
4
4
|
createPlugin,
|
5
5
|
useAppContext,
|
@@ -62,12 +62,10 @@ export default createPlugin(
|
|
62
62
|
return {};
|
63
63
|
},
|
64
64
|
async afterBuild() {
|
65
|
-
const {
|
66
|
-
value: { appDirectory, distDirectory },
|
67
|
-
// eslint-disable-next-line react-hooks/rules-of-hooks
|
68
|
-
} = useAppContext();
|
69
65
|
// eslint-disable-next-line react-hooks/rules-of-hooks
|
70
|
-
const {
|
66
|
+
const { appDirectory, distDirectory } = useAppContext();
|
67
|
+
// eslint-disable-next-line react-hooks/rules-of-hooks
|
68
|
+
const modernConfig = useResolvedConfigContext();
|
71
69
|
|
72
70
|
const distDir = path.resolve(distDirectory);
|
73
71
|
const serverDir = path.resolve(appDirectory, SERVER_DIR);
|