@modern-js/runtime 1.0.0-rc.5 → 1.0.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 CHANGED
@@ -1,5 +1,355 @@
1
1
  # @modern-js/runtime
2
2
 
3
+ ## 1.0.0
4
+
5
+ ### Patch Changes
6
+
7
+ - 224f7fe: fix server route match
8
+ - 30ac27c: feat: add generator package description
9
+ - 0fd196e: feat: fix bugs
10
+ - 204c626: feat: initial
11
+ - 63be0a5: fix: #118 #104
12
+ - Updated dependencies [224f7fe]
13
+ - Updated dependencies [30ac27c]
14
+ - Updated dependencies [0fd196e]
15
+ - Updated dependencies [204c626]
16
+ - Updated dependencies [63be0a5]
17
+ - @modern-js/core@1.0.0
18
+ - @modern-js/plugin-router@1.0.0
19
+ - @modern-js/plugin-ssr@1.0.0
20
+ - @modern-js/plugin-state@1.0.0
21
+ - @modern-js/runtime-core@1.0.0
22
+ - @modern-js/bff-runtime@1.0.0
23
+ - @modern-js/utils@1.0.0
24
+
25
+ ## 1.0.0-rc.23
26
+
27
+ ### Patch Changes
28
+
29
+ - 224f7fe: fix server route match
30
+ - 30ac27c: feat: add generator package description
31
+ - 0fd196e: feat: fix bugs
32
+ - 204c626: feat: initial
33
+ - 63be0a5: fix: #118 #104
34
+ - Updated dependencies [224f7fe]
35
+ - Updated dependencies [30ac27c]
36
+ - Updated dependencies [0fd196e]
37
+ - Updated dependencies [204c626]
38
+ - Updated dependencies [63be0a5]
39
+ - @modern-js/core@1.0.0-rc.23
40
+ - @modern-js/plugin-router@1.0.0-rc.23
41
+ - @modern-js/plugin-ssr@1.0.0-rc.23
42
+ - @modern-js/plugin-state@1.0.0-rc.23
43
+ - @modern-js/runtime-core@1.0.0-rc.23
44
+ - @modern-js/bff-runtime@1.0.0-rc.23
45
+ - @modern-js/utils@1.0.0-rc.23
46
+
47
+ ## 1.0.0-rc.22
48
+
49
+ ### Patch Changes
50
+
51
+ - 224f7fe: fix server route match
52
+ - 30ac27c: feat: add generator package description
53
+ - 0fd196e: feat: fix bugs
54
+ - 204c626: feat: initial
55
+ - 63be0a5: fix: #118 #104
56
+ - Updated dependencies [224f7fe]
57
+ - Updated dependencies [30ac27c]
58
+ - Updated dependencies [0fd196e]
59
+ - Updated dependencies [204c626]
60
+ - Updated dependencies [63be0a5]
61
+ - @modern-js/core@1.0.0-rc.22
62
+ - @modern-js/plugin-router@1.0.0-rc.22
63
+ - @modern-js/plugin-ssr@1.0.0-rc.22
64
+ - @modern-js/plugin-state@1.0.0-rc.22
65
+ - @modern-js/runtime-core@1.0.0-rc.22
66
+ - @modern-js/bff-runtime@1.0.0-rc.22
67
+ - @modern-js/utils@1.0.0-rc.22
68
+
69
+ ## 1.0.0-rc.21
70
+
71
+ ### Patch Changes
72
+
73
+ - 224f7fe: fix server route match
74
+ - 30ac27c: feat: add generator package description
75
+ - 0fd196e: feat: fix bugs
76
+ - 204c626: feat: initial
77
+ - 63be0a5: fix: #118 #104
78
+ - Updated dependencies [224f7fe]
79
+ - Updated dependencies [30ac27c]
80
+ - Updated dependencies [0fd196e]
81
+ - Updated dependencies [204c626]
82
+ - Updated dependencies [63be0a5]
83
+ - @modern-js/core@1.0.0-rc.21
84
+ - @modern-js/plugin-router@1.0.0-rc.21
85
+ - @modern-js/plugin-ssr@1.0.0-rc.21
86
+ - @modern-js/plugin-state@1.0.0-rc.21
87
+ - @modern-js/runtime-core@1.0.0-rc.21
88
+ - @modern-js/bff-runtime@1.0.0-rc.21
89
+ - @modern-js/utils@1.0.0-rc.21
90
+
91
+ ## 1.0.0-rc.20
92
+
93
+ ### Patch Changes
94
+
95
+ - 224f7fe: fix server route match
96
+ - 30ac27c: feat: add generator package description
97
+ - feat: fix bugs
98
+ - 204c626: feat: initial
99
+ - 63be0a5: fix: #118 #104
100
+ - Updated dependencies [224f7fe]
101
+ - Updated dependencies [30ac27c]
102
+ - Updated dependencies [undefined]
103
+ - Updated dependencies [204c626]
104
+ - Updated dependencies [63be0a5]
105
+ - @modern-js/core@1.0.0-rc.20
106
+ - @modern-js/plugin-router@1.0.0-rc.20
107
+ - @modern-js/plugin-ssr@1.0.0-rc.20
108
+ - @modern-js/plugin-state@1.0.0-rc.20
109
+ - @modern-js/runtime-core@1.0.0-rc.20
110
+ - @modern-js/bff-runtime@1.0.0-rc.20
111
+ - @modern-js/utils@1.0.0-rc.20
112
+
113
+ ## 1.0.0-rc.19
114
+
115
+ ### Patch Changes
116
+
117
+ - 224f7fe: fix server route match
118
+ - 30ac27c: feat: add generator package description
119
+ - 204c626: feat: initial
120
+ - 63be0a5: fix: #118 #104
121
+ - Updated dependencies [224f7fe]
122
+ - Updated dependencies [30ac27c]
123
+ - Updated dependencies [204c626]
124
+ - Updated dependencies [63be0a5]
125
+ - @modern-js/core@1.0.0-rc.19
126
+ - @modern-js/plugin-router@1.0.0-rc.19
127
+ - @modern-js/plugin-ssr@1.0.0-rc.19
128
+ - @modern-js/plugin-state@1.0.0-rc.19
129
+ - @modern-js/runtime-core@1.0.0-rc.19
130
+ - @modern-js/bff-runtime@1.0.0-rc.19
131
+ - @modern-js/utils@1.0.0-rc.19
132
+
133
+ ## 1.0.0-rc.18
134
+
135
+ ### Patch Changes
136
+
137
+ - 224f7fe: fix server route match
138
+ - 30ac27c: feat: add generator package description
139
+ - 204c626: feat: initial
140
+ - 63be0a5: fix: #118 #104
141
+ - Updated dependencies [224f7fe]
142
+ - Updated dependencies [30ac27c]
143
+ - Updated dependencies [204c626]
144
+ - Updated dependencies [63be0a5]
145
+ - @modern-js/core@1.0.0-rc.18
146
+ - @modern-js/plugin-router@1.0.0-rc.18
147
+ - @modern-js/plugin-ssr@1.0.0-rc.18
148
+ - @modern-js/plugin-state@1.0.0-rc.18
149
+ - @modern-js/runtime-core@1.0.0-rc.18
150
+ - @modern-js/bff-runtime@1.0.0-rc.18
151
+ - @modern-js/utils@1.0.0-rc.18
152
+
153
+ ## 1.0.0-rc.17
154
+
155
+ ### Patch Changes
156
+
157
+ - 224f7fe: fix server route match
158
+ - 30ac27c: feat: add generator package description
159
+ - 204c626: feat: initial
160
+ - fix: #118 #104
161
+ - Updated dependencies [224f7fe]
162
+ - Updated dependencies [30ac27c]
163
+ - Updated dependencies [204c626]
164
+ - Updated dependencies [undefined]
165
+ - @modern-js/core@1.0.0-rc.17
166
+ - @modern-js/plugin-router@1.0.0-rc.17
167
+ - @modern-js/plugin-ssr@1.0.0-rc.17
168
+ - @modern-js/plugin-state@1.0.0-rc.17
169
+ - @modern-js/runtime-core@1.0.0-rc.17
170
+ - @modern-js/bff-runtime@1.0.0-rc.17
171
+ - @modern-js/utils@1.0.0-rc.17
172
+
173
+ ## 1.0.0-rc.16
174
+
175
+ ### Patch Changes
176
+
177
+ - 224f7fe: fix server route match
178
+ - 30ac27c: feat: add generator package description
179
+ - 204c626: feat: initial
180
+ - Updated dependencies [224f7fe]
181
+ - Updated dependencies [30ac27c]
182
+ - Updated dependencies [204c626]
183
+ - @modern-js/core@1.0.0-rc.16
184
+ - @modern-js/plugin-router@1.0.0-rc.16
185
+ - @modern-js/plugin-ssr@1.0.0-rc.16
186
+ - @modern-js/plugin-state@1.0.0-rc.16
187
+ - @modern-js/runtime-core@1.0.0-rc.16
188
+ - @modern-js/bff-runtime@1.0.0-rc.16
189
+ - @modern-js/utils@1.0.0-rc.16
190
+
191
+ ## 1.0.0-rc.15
192
+
193
+ ### Patch Changes
194
+
195
+ - 224f7fe: fix server route match
196
+ - 30ac27c: feat: add generator package description
197
+ - 204c626: feat: initial
198
+ - Updated dependencies [224f7fe]
199
+ - Updated dependencies [30ac27c]
200
+ - Updated dependencies [204c626]
201
+ - @modern-js/core@1.0.0-rc.15
202
+ - @modern-js/plugin-router@1.0.0-rc.15
203
+ - @modern-js/plugin-ssr@1.0.0-rc.15
204
+ - @modern-js/plugin-state@1.0.0-rc.15
205
+ - @modern-js/runtime-core@1.0.0-rc.15
206
+ - @modern-js/bff-runtime@1.0.0-rc.15
207
+ - @modern-js/utils@1.0.0-rc.15
208
+
209
+ ## 1.0.0-rc.14
210
+
211
+ ### Patch Changes
212
+
213
+ - 224f7fe: fix server route match
214
+ - 204c626: feat: initial
215
+ - Updated dependencies [224f7fe]
216
+ - Updated dependencies [204c626]
217
+ - @modern-js/core@1.0.0-rc.14
218
+ - @modern-js/plugin-router@1.0.0-rc.14
219
+ - @modern-js/plugin-ssr@1.0.0-rc.14
220
+ - @modern-js/plugin-state@1.0.0-rc.14
221
+ - @modern-js/runtime-core@1.0.0-rc.14
222
+ - @modern-js/bff-runtime@1.0.0-rc.14
223
+ - @modern-js/utils@1.0.0-rc.14
224
+
225
+ ## 1.0.0-rc.13
226
+
227
+ ### Patch Changes
228
+
229
+ - 224f7fe: fix server route match
230
+ - 204c626: feat: initial
231
+ - Updated dependencies [224f7fe]
232
+ - Updated dependencies [204c626]
233
+ - @modern-js/core@1.0.0-rc.13
234
+ - @modern-js/plugin-router@1.0.0-rc.13
235
+ - @modern-js/plugin-ssr@1.0.0-rc.13
236
+ - @modern-js/plugin-state@1.0.0-rc.13
237
+ - @modern-js/runtime-core@1.0.0-rc.13
238
+ - @modern-js/bff-runtime@1.0.0-rc.13
239
+ - @modern-js/utils@1.0.0-rc.13
240
+
241
+ ## 1.0.0-rc.12
242
+
243
+ ### Patch Changes
244
+
245
+ - 224f7fe: fix server route match
246
+ - 204c626: feat: initial
247
+ - Updated dependencies [224f7fe]
248
+ - Updated dependencies [204c626]
249
+ - @modern-js/core@1.0.0-rc.12
250
+ - @modern-js/plugin-router@1.0.0-rc.12
251
+ - @modern-js/plugin-ssr@1.0.0-rc.12
252
+ - @modern-js/plugin-state@1.0.0-rc.12
253
+ - @modern-js/runtime-core@1.0.0-rc.12
254
+ - @modern-js/bff-runtime@1.0.0-rc.12
255
+ - @modern-js/utils@1.0.0-rc.12
256
+
257
+ ## 1.0.0-rc.11
258
+
259
+ ### Patch Changes
260
+
261
+ - 224f7fe: fix server route match
262
+ - 204c626: feat: initial
263
+ - Updated dependencies [224f7fe]
264
+ - Updated dependencies [204c626]
265
+ - @modern-js/core@1.0.0-rc.11
266
+ - @modern-js/plugin-router@1.0.0-rc.11
267
+ - @modern-js/plugin-ssr@1.0.0-rc.11
268
+ - @modern-js/plugin-state@1.0.0-rc.11
269
+ - @modern-js/runtime-core@1.0.0-rc.11
270
+ - @modern-js/bff-runtime@1.0.0-rc.11
271
+ - @modern-js/utils@1.0.0-rc.11
272
+
273
+ ## 1.0.0-rc.10
274
+
275
+ ### Patch Changes
276
+
277
+ - 224f7fe: fix server route match
278
+ - 204c626: feat: initial
279
+ - Updated dependencies [224f7fe]
280
+ - Updated dependencies [204c626]
281
+ - @modern-js/core@1.0.0-rc.10
282
+ - @modern-js/plugin-router@1.0.0-rc.10
283
+ - @modern-js/plugin-ssr@1.0.0-rc.10
284
+ - @modern-js/plugin-state@1.0.0-rc.10
285
+ - @modern-js/runtime-core@1.0.0-rc.10
286
+ - @modern-js/bff-runtime@1.0.0-rc.10
287
+ - @modern-js/utils@1.0.0-rc.10
288
+
289
+ ## 1.0.0-rc.9
290
+
291
+ ### Patch Changes
292
+
293
+ - 224f7fe: fix server route match
294
+ - 204c626: feat: initial
295
+ - Updated dependencies [224f7fe]
296
+ - Updated dependencies [204c626]
297
+ - @modern-js/core@1.0.0-rc.9
298
+ - @modern-js/plugin-router@1.0.0-rc.9
299
+ - @modern-js/plugin-ssr@1.0.0-rc.9
300
+ - @modern-js/plugin-state@1.0.0-rc.9
301
+ - @modern-js/runtime-core@1.0.0-rc.9
302
+ - @modern-js/bff-runtime@1.0.0-rc.9
303
+ - @modern-js/utils@1.0.0-rc.9
304
+
305
+ ## 1.0.0-rc.8
306
+
307
+ ### Patch Changes
308
+
309
+ - 224f7fe: fix server route match
310
+ - 204c626: feat: initial
311
+ - Updated dependencies [224f7fe]
312
+ - Updated dependencies [204c626]
313
+ - @modern-js/core@1.0.0-rc.8
314
+ - @modern-js/plugin-router@1.0.0-rc.8
315
+ - @modern-js/plugin-ssr@1.0.0-rc.8
316
+ - @modern-js/plugin-state@1.0.0-rc.8
317
+ - @modern-js/runtime-core@1.0.0-rc.8
318
+ - @modern-js/bff-runtime@1.0.0-rc.8
319
+ - @modern-js/utils@1.0.0-rc.8
320
+
321
+ ## 1.0.0-rc.7
322
+
323
+ ### Patch Changes
324
+
325
+ - 224f7fe: fix server route match
326
+ - 204c626: feat: initial
327
+ - Updated dependencies [224f7fe]
328
+ - Updated dependencies [204c626]
329
+ - @modern-js/core@1.0.0-rc.7
330
+ - @modern-js/plugin-router@1.0.0-rc.7
331
+ - @modern-js/plugin-ssr@1.0.0-rc.7
332
+ - @modern-js/plugin-state@1.0.0-rc.7
333
+ - @modern-js/runtime-core@1.0.0-rc.7
334
+ - @modern-js/bff-runtime@1.0.0-rc.7
335
+ - @modern-js/utils@1.0.0-rc.7
336
+
337
+ ## 1.0.0-rc.6
338
+
339
+ ### Patch Changes
340
+
341
+ - 224f7fe: fix server route match
342
+ - 204c626: feat: initial
343
+ - Updated dependencies [224f7fe]
344
+ - Updated dependencies [204c626]
345
+ - @modern-js/core@1.0.0-rc.6
346
+ - @modern-js/plugin-router@1.0.0-rc.6
347
+ - @modern-js/plugin-ssr@1.0.0-rc.6
348
+ - @modern-js/plugin-state@1.0.0-rc.6
349
+ - @modern-js/runtime-core@1.0.0-rc.6
350
+ - @modern-js/bff-runtime@1.0.0-rc.6
351
+ - @modern-js/utils@1.0.0-rc.6
352
+
3
353
  ## 1.0.0-rc.5
4
354
 
5
355
  ### Patch Changes
package/README.md CHANGED
@@ -2,31 +2,32 @@
2
2
  <p align="center">
3
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
4
  </p>
5
+ <p align="center">
6
+ 现代 Web 工程体系
7
+ <br/>
8
+ <a href="https://modernjs.dev" target="blank">
9
+ modernjs.dev
10
+ </a>
11
+ </p>
12
+ <p align="center">
13
+ The meta-framework suite designed from scratch for frontend-focused modern web development
14
+ </p>
15
+
16
+ # Introduction
5
17
 
6
- <p align="center">现代 Web 工程体系</p>
18
+ > The doc site ([modernjs.dev](https://modernjs.dev)) and articles are only available in Chinese for now, we are planning to add English versions soon.
7
19
 
8
- ## 背景
20
+ - 介绍 Modern.js (即将上线)
9
21
  - [迈入现代 Web 开发](https://zhuanlan.zhihu.com/p/386607009)
10
22
  - [现代 Web 开发者问卷调查报告](https://zhuanlan.zhihu.com/p/403206195)
23
+ - [字节跳动是如何落地微前端的](https://mp.weixin.qq.com/s/L9wbfNG5fTXF5bx7dcgj4Q)
11
24
 
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
-
25
+ ## Getting Started
30
26
 
27
+ - [Quick Start](https://modernjs.dev/docs/start)
28
+ - [Guides](https://modernjs.dev/docs/guides)
29
+ - [API References](https://modernjs.dev/docs/apis)
31
30
 
31
+ ## Contributing
32
32
 
33
+ - [Contributing Guide](https://github.com/modern-js-dev/modern.js/blob/main/CONTRIBUTING.md)
@@ -1,17 +1,16 @@
1
- import path from 'path';
1
+ import { path, PLUGIN_SCHEMAS, createRuntimeExportsUtils, upath } from '@modern-js/utils';
2
2
  import { createPlugin, usePlugins, useAppContext } from '@modern-js/core';
3
- import { PLUGIN_SCHEMAS, createRuntimeExportsUtils } from '@modern-js/utils';
4
3
 
5
4
  const useInternalDirectory = () => {
6
5
  try {
7
- return useAppContext().value.internalDirectory;
6
+ return useAppContext().internalDirectory;
8
7
  } catch (_unused) {
9
8
  return path.join(process.cwd(), 'node_modules/.modern-js');
10
9
  }
11
10
  }; // eslint-disable-next-line react-hooks/rules-of-hooks
12
11
 
13
12
 
14
- usePlugins([require.resolve('@modern-js/plugin-state/cli'), require.resolve('@modern-js/plugin-router/cli'), require.resolve('@modern-js/plugin-ssr/cli')]);
13
+ usePlugins([upath.normalizeSafe(require.resolve('@modern-js/plugin-state/cli')), upath.normalizeSafe(require.resolve('@modern-js/plugin-router/cli')), upath.normalizeSafe(require.resolve('@modern-js/plugin-ssr/cli'))]);
15
14
  export default createPlugin(() => {
16
15
  let runtimeExportsUtils = {};
17
16
  return {
@@ -5,24 +5,20 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  exports.default = void 0;
7
7
 
8
- var _path = _interopRequireDefault(require("path"));
9
-
10
- var _core = require("@modern-js/core");
11
-
12
8
  var _utils = require("@modern-js/utils");
13
9
 
14
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
10
+ var _core = require("@modern-js/core");
15
11
 
16
12
  const useInternalDirectory = () => {
17
13
  try {
18
- return (0, _core.useAppContext)().value.internalDirectory;
14
+ return (0, _core.useAppContext)().internalDirectory;
19
15
  } catch (_unused) {
20
- return _path.default.join(process.cwd(), 'node_modules/.modern-js');
16
+ return _utils.path.join(process.cwd(), 'node_modules/.modern-js');
21
17
  }
22
18
  }; // eslint-disable-next-line react-hooks/rules-of-hooks
23
19
 
24
20
 
25
- (0, _core.usePlugins)([require.resolve('@modern-js/plugin-state/cli'), require.resolve('@modern-js/plugin-router/cli'), require.resolve('@modern-js/plugin-ssr/cli')]);
21
+ (0, _core.usePlugins)([_utils.upath.normalizeSafe(require.resolve('@modern-js/plugin-state/cli')), _utils.upath.normalizeSafe(require.resolve('@modern-js/plugin-router/cli')), _utils.upath.normalizeSafe(require.resolve('@modern-js/plugin-ssr/cli'))]);
26
22
 
27
23
  var _default = (0, _core.createPlugin)(() => {
28
24
  let runtimeExportsUtils = {};
@@ -47,7 +43,7 @@ var _default = (0, _core.createPlugin)(() => {
47
43
  },
48
44
 
49
45
  addRuntimeExports() {
50
- const runtimePackage = _path.default.resolve(__dirname, '../../../../');
46
+ const runtimePackage = _utils.path.resolve(__dirname, '../../../../');
51
47
 
52
48
  runtimeExportsUtils.addExport(`export * from '${runtimePackage}'`);
53
49
  }
@@ -1,17 +1,16 @@
1
- import path from 'path';
1
+ import { path, PLUGIN_SCHEMAS, createRuntimeExportsUtils, upath } from '@modern-js/utils';
2
2
  import { createPlugin, usePlugins, useAppContext } from '@modern-js/core';
3
- import { PLUGIN_SCHEMAS, createRuntimeExportsUtils } from '@modern-js/utils';
4
3
 
5
4
  var useInternalDirectory = function useInternalDirectory() {
6
5
  try {
7
- return useAppContext().value.internalDirectory;
6
+ return useAppContext().internalDirectory;
8
7
  } catch (_unused) {
9
8
  return path.join(process.cwd(), 'node_modules/.modern-js');
10
9
  }
11
10
  }; // eslint-disable-next-line react-hooks/rules-of-hooks
12
11
 
13
12
 
14
- usePlugins([require.resolve('@modern-js/plugin-state/cli'), require.resolve('@modern-js/plugin-router/cli'), require.resolve('@modern-js/plugin-ssr/cli')]);
13
+ usePlugins([upath.normalizeSafe(require.resolve('@modern-js/plugin-state/cli')), upath.normalizeSafe(require.resolve('@modern-js/plugin-router/cli')), upath.normalizeSafe(require.resolve('@modern-js/plugin-ssr/cli'))]);
15
14
  export default createPlugin(function () {
16
15
  var runtimeExportsUtils = {};
17
16
  return {
package/package.json CHANGED
@@ -1,6 +1,17 @@
1
1
  {
2
2
  "name": "@modern-js/runtime",
3
- "version": "1.0.0-rc.5",
3
+ "description": "The meta-framework suite designed from scratch for frontend-focused modern web development.",
4
+ "homepage": "https://modernjs.dev",
5
+ "bugs": "https://github.com/modern-js-dev/modern.js/issues",
6
+ "repository": "modern-js-dev/modern.js",
7
+ "license": "MIT",
8
+ "keywords": [
9
+ "react",
10
+ "framework",
11
+ "modern",
12
+ "modern.js"
13
+ ],
14
+ "version": "1.0.0",
4
15
  "jsnext:source": "./src/index.ts",
5
16
  "types": "./type.d.ts",
6
17
  "main": "./dist/js/node/index.js",
@@ -8,59 +19,35 @@
8
19
  "jsnext:modern": "./dist/js/modern/index.js",
9
20
  "exports": {
10
21
  ".": {
11
- "node": {
12
- "import": "./dist/js/modern/index.js",
13
- "require": "./dist/js/node/index.js"
14
- },
22
+ "node": "./dist/js/node/index.js",
15
23
  "default": "./dist/js/treeshaking/index.js"
16
24
  },
17
25
  "./loadable": {
18
- "node": {
19
- "import": "./dist/js/modern/exports/loadable.js",
20
- "require": "./dist/js/node/exports/loadable.js"
21
- },
26
+ "node": "./dist/js/node/exports/loadable.js",
22
27
  "default": "./dist/js/treeshaking/exports/loadable.js"
23
28
  },
24
29
  "./head": {
25
- "node": {
26
- "import": "./dist/js/modern/exports/head.js",
27
- "require": "./dist/js/node/exports/head.js"
28
- },
30
+ "node": "./dist/js/node/exports/head.js",
29
31
  "default": "./dist/js/treeshaking/exports/head.js"
30
32
  },
31
33
  "./styled": {
32
- "node": {
33
- "import": "./dist/js/modern/exports/styled.js",
34
- "require": "./dist/js/node/exports/styled.js"
35
- },
34
+ "node": "./dist/js/node/exports/styled.js",
36
35
  "default": "./dist/js/treeshaking/exports/styled.js"
37
36
  },
38
37
  "./server": {
39
- "node": {
40
- "import": "./dist/js/modern/exports/server.js",
41
- "require": "./dist/js/node/exports/server.js"
42
- },
38
+ "node": "./dist/js/node/exports/server.js",
43
39
  "default": "./dist/js/treeshaking/exports/server.js"
44
40
  },
45
41
  "./router": {
46
- "node": {
47
- "import": "./dist/js/modern/exports/router.js",
48
- "require": "./dist/js/node/exports/router.js"
49
- },
42
+ "node": "./dist/js/node/exports/router.js",
50
43
  "default": "./dist/js/treeshaking/exports/router.js"
51
44
  },
52
45
  "./ssr": {
53
- "node": {
54
- "import": "./dist/js/modern/exports/ssr.js",
55
- "require": "./dist/js/node/exports/ssr.js"
56
- },
46
+ "node": "./dist/js/node/exports/ssr.js",
57
47
  "default": "./dist/js/treeshaking/exports/ssr.js"
58
48
  },
59
49
  "./model": {
60
- "node": {
61
- "import": "./dist/js/modern/exports/model.js",
62
- "require": "./dist/js/node/exports/model.js"
63
- },
50
+ "node": "./dist/js/node/exports/model.js",
64
51
  "default": "./dist/js/treeshaking/exports/model.js"
65
52
  },
66
53
  "./cli": "./dist/js/node/cli/index.js"
@@ -89,20 +76,19 @@
89
76
  "./dist/types/exports/router.d.ts"
90
77
  ],
91
78
  "model": [
92
- "./dist/types/exports/model.d.ts"
79
+ "./types/model.d.ts"
93
80
  ]
94
81
  }
95
82
  },
96
83
  "dependencies": {
97
84
  "@babel/runtime": "^7",
98
85
  "@loadable/component": "^5.15.0",
99
- "@modern-js/bff-runtime": "^1.0.0-rc.5",
100
- "@modern-js/core": "^1.0.0-rc.5",
101
- "@modern-js/plugin-router": "^1.0.0-rc.5",
102
- "@modern-js/plugin-ssr": "^1.0.0-rc.5",
103
- "@modern-js/plugin-state": "^1.0.0-rc.5",
104
- "@modern-js/runtime-core": "^1.0.0-rc.5",
105
- "@modern-js/utils": "^1.0.0-rc.5",
86
+ "@modern-js/bff-runtime": "^1.0.0",
87
+ "@modern-js/plugin-router": "^1.0.0",
88
+ "@modern-js/plugin-ssr": "^1.0.0",
89
+ "@modern-js/plugin-state": "^1.0.0",
90
+ "@modern-js/runtime-core": "^1.0.0",
91
+ "@modern-js/utils": "^1.0.0",
106
92
  "@types/loadable__component": "^5.13.4",
107
93
  "@types/react-helmet": "^6.1.2",
108
94
  "@types/styled-components": "^5.1.13",
@@ -115,8 +101,12 @@
115
101
  "@types/react": "^17",
116
102
  "@types/react-dom": "^17",
117
103
  "typescript": "^4",
118
- "@modern-js/plugin-testing": "^1.0.0-rc.5",
119
- "@modern-js/module-tools": "^1.0.0-rc.5"
104
+ "@modern-js/core": "^1.0.0",
105
+ "@modern-js/plugin-testing": "^1.0.0",
106
+ "@modern-js/module-tools": "^1.0.0"
107
+ },
108
+ "peerDependencies": {
109
+ "@modern-js/core": "^1.0.0"
120
110
  },
121
111
  "sideEffects": false,
122
112
  "modernConfig": {},
package/src/cli/index.ts CHANGED
@@ -1,10 +1,14 @@
1
- import path from 'path';
1
+ import {
2
+ path,
3
+ PLUGIN_SCHEMAS,
4
+ createRuntimeExportsUtils,
5
+ upath,
6
+ } from '@modern-js/utils';
2
7
  import { createPlugin, usePlugins, useAppContext } from '@modern-js/core';
3
- import { PLUGIN_SCHEMAS, createRuntimeExportsUtils } from '@modern-js/utils';
4
8
 
5
9
  const useInternalDirectory = () => {
6
10
  try {
7
- return useAppContext().value.internalDirectory;
11
+ return useAppContext().internalDirectory;
8
12
  } catch {
9
13
  return path.join(process.cwd(), 'node_modules/.modern-js');
10
14
  }
@@ -12,9 +16,9 @@ const useInternalDirectory = () => {
12
16
 
13
17
  // eslint-disable-next-line react-hooks/rules-of-hooks
14
18
  usePlugins([
15
- require.resolve('@modern-js/plugin-state/cli'),
16
- require.resolve('@modern-js/plugin-router/cli'),
17
- require.resolve('@modern-js/plugin-ssr/cli'),
19
+ upath.normalizeSafe(require.resolve('@modern-js/plugin-state/cli')),
20
+ upath.normalizeSafe(require.resolve('@modern-js/plugin-router/cli')),
21
+ upath.normalizeSafe(require.resolve('@modern-js/plugin-ssr/cli')),
18
22
  ]);
19
23
 
20
24
  export default createPlugin(
@@ -0,0 +1,3 @@
1
+ import '@modern-js/plugin-state/type';
2
+
3
+ export * from '../dist/types/exports/model';