@modern-js/app-tools 0.0.0-next-3ef832741 → 0.0.0-next-1678282721176
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 +21 -19
- package/dist/cjs/analyze/generateCode.js +13 -0
- package/dist/cjs/analyze/index.js +0 -37
- package/dist/cjs/analyze/templates.js +26 -2
- package/dist/cjs/analyze/utils.js +5 -0
- package/dist/cjs/builder/shared/builderPlugins/adapterSSR.js +24 -1
- package/dist/esm/analyze/generateCode.js +30 -16
- package/dist/esm/analyze/index.js +2 -26
- package/dist/esm/analyze/templates.js +16 -2
- package/dist/esm/analyze/utils.js +4 -1
- package/dist/esm/builder/shared/builderPlugins/adapterSSR.js +21 -1
- package/dist/esm-node/analyze/generateCode.js +18 -1
- package/dist/esm-node/analyze/index.js +2 -46
- package/dist/esm-node/analyze/templates.js +25 -2
- package/dist/esm-node/analyze/utils.js +4 -0
- package/dist/esm-node/builder/shared/builderPlugins/adapterSSR.js +24 -1
- package/dist/types/analyze/templates.d.ts +3 -2
- package/dist/types/analyze/utils.d.ts +2 -1
- package/package.json +24 -24
package/CHANGELOG.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# @modern-js/app-tools
|
|
2
2
|
|
|
3
|
-
## 0.0.0-next-
|
|
3
|
+
## 0.0.0-next-1678282721176
|
|
4
4
|
|
|
5
5
|
### Minor Changes
|
|
6
6
|
|
|
@@ -15,6 +15,8 @@
|
|
|
15
15
|
fix: 修复嵌套路由在 SSG 中的问题
|
|
16
16
|
- 2b6b1a014: refactor: app-tools builder
|
|
17
17
|
refactor: 重构 app-tools builder
|
|
18
|
+
- 250f794c4: fix: move the analyze webpackChain config to app-tools builder shared
|
|
19
|
+
fix: 将 anylyze 的 `webpackChain` 配置项移植进 app-tools builder shared
|
|
18
20
|
- Updated dependencies [ea7bb41e3]
|
|
19
21
|
- Updated dependencies [0cf8540ff]
|
|
20
22
|
- Updated dependencies [bd369a89a]
|
|
@@ -23,24 +25,24 @@
|
|
|
23
25
|
- Updated dependencies [2c1151271]
|
|
24
26
|
- Updated dependencies [1f6ca2c7f]
|
|
25
27
|
- Updated dependencies [457ee832b]
|
|
26
|
-
- @modern-js/server@0.0.0-next-
|
|
27
|
-
- @modern-js/plugin-data-loader@0.0.0-next-
|
|
28
|
-
- @modern-js/builder@0.0.0-next-
|
|
29
|
-
- @modern-js/builder-shared@0.0.0-next-
|
|
30
|
-
- @modern-js/builder-rspack-provider@0.0.0-next-
|
|
31
|
-
- @modern-js/prod-server@0.0.0-next-
|
|
32
|
-
- @modern-js/utils@0.0.0-next-
|
|
33
|
-
- @modern-js/builder-webpack-provider@0.0.0-next-
|
|
34
|
-
- @modern-js/types@0.0.0-next-
|
|
35
|
-
- @modern-js/builder-plugin-esbuild@0.0.0-next-
|
|
36
|
-
- @modern-js/builder-plugin-node-polyfill@0.0.0-next-
|
|
37
|
-
- @modern-js/core@0.0.0-next-
|
|
38
|
-
- @modern-js/plugin-i18n@0.0.0-next-
|
|
39
|
-
- @modern-js/plugin-lint@0.0.0-next-
|
|
40
|
-
- @modern-js/new-action@0.0.0-next-
|
|
41
|
-
- @modern-js/node-bundle-require@0.0.0-next-
|
|
42
|
-
- @modern-js/upgrade@0.0.0-next-
|
|
43
|
-
- @modern-js/plugin@0.0.0-next-
|
|
28
|
+
- @modern-js/server@0.0.0-next-1678282721176
|
|
29
|
+
- @modern-js/plugin-data-loader@0.0.0-next-1678282721176
|
|
30
|
+
- @modern-js/builder@0.0.0-next-1678282721176
|
|
31
|
+
- @modern-js/builder-shared@0.0.0-next-1678282721176
|
|
32
|
+
- @modern-js/builder-rspack-provider@0.0.0-next-1678282721176
|
|
33
|
+
- @modern-js/prod-server@0.0.0-next-1678282721176
|
|
34
|
+
- @modern-js/utils@0.0.0-next-1678282721176
|
|
35
|
+
- @modern-js/builder-webpack-provider@0.0.0-next-1678282721176
|
|
36
|
+
- @modern-js/types@0.0.0-next-1678282721176
|
|
37
|
+
- @modern-js/builder-plugin-esbuild@0.0.0-next-1678282721176
|
|
38
|
+
- @modern-js/builder-plugin-node-polyfill@0.0.0-next-1678282721176
|
|
39
|
+
- @modern-js/core@0.0.0-next-1678282721176
|
|
40
|
+
- @modern-js/plugin-i18n@0.0.0-next-1678282721176
|
|
41
|
+
- @modern-js/plugin-lint@0.0.0-next-1678282721176
|
|
42
|
+
- @modern-js/new-action@0.0.0-next-1678282721176
|
|
43
|
+
- @modern-js/node-bundle-require@0.0.0-next-1678282721176
|
|
44
|
+
- @modern-js/upgrade@0.0.0-next-1678282721176
|
|
45
|
+
- @modern-js/plugin@0.0.0-next-1678282721176
|
|
44
46
|
|
|
45
47
|
## 2.7.0
|
|
46
48
|
|
|
@@ -175,6 +175,19 @@ const generateCode = async (appContext, config, entrypoints, api) => {
|
|
|
175
175
|
await import_utils.fs.ensureFile(routesServerFile);
|
|
176
176
|
await import_utils.fs.writeFile(routesServerFile, code3);
|
|
177
177
|
}
|
|
178
|
+
const serverLoaderCombined = templates.ssrLoaderCombinedModule(
|
|
179
|
+
entrypoints,
|
|
180
|
+
entrypoint,
|
|
181
|
+
config2,
|
|
182
|
+
appContext
|
|
183
|
+
);
|
|
184
|
+
if (serverLoaderCombined) {
|
|
185
|
+
const serverLoaderFile = (0, import_utils2.getServerCombinedModueFile)(
|
|
186
|
+
internalDirectory,
|
|
187
|
+
entryName
|
|
188
|
+
);
|
|
189
|
+
await import_utils.fs.outputFile(serverLoaderFile, serverLoaderCombined);
|
|
190
|
+
}
|
|
178
191
|
import_utils.fs.outputFileSync(
|
|
179
192
|
import_path.default.resolve(
|
|
180
193
|
internalDirectory,
|
|
@@ -33,7 +33,6 @@ module.exports = __toCommonJS(analyze_exports);
|
|
|
33
33
|
var path = __toESM(require("path"));
|
|
34
34
|
var import_utils = require("@modern-js/utils");
|
|
35
35
|
var import_lodash = require("@modern-js/utils/lodash");
|
|
36
|
-
var import_builder_shared = require("@modern-js/builder-shared");
|
|
37
36
|
var import_printInstructions = require("../utils/printInstructions");
|
|
38
37
|
var import_routes = require("../utils/routes");
|
|
39
38
|
var import_config = require("../utils/config");
|
|
@@ -190,42 +189,6 @@ var analyze_default = ({
|
|
|
190
189
|
watchFiles() {
|
|
191
190
|
return pagesDir;
|
|
192
191
|
},
|
|
193
|
-
config() {
|
|
194
|
-
return {
|
|
195
|
-
tools: {
|
|
196
|
-
webpackChain: (chain, { name }) => {
|
|
197
|
-
const appContext = api.useAppContext();
|
|
198
|
-
const resolvedConfig = api.useResolvedConfigContext();
|
|
199
|
-
const { entrypoints, internalDirectory, packageName } = appContext;
|
|
200
|
-
entrypoints.forEach((entrypoint) => {
|
|
201
|
-
const { entryName } = entrypoint;
|
|
202
|
-
const ssr = (0, import_utils.getEntryOptions)(
|
|
203
|
-
entryName,
|
|
204
|
-
resolvedConfig.server.ssr,
|
|
205
|
-
resolvedConfig.server.ssrByEntries,
|
|
206
|
-
packageName
|
|
207
|
-
);
|
|
208
|
-
const useSSG = (0, import_utils.isSSGEntry)(
|
|
209
|
-
resolvedConfig,
|
|
210
|
-
entryName,
|
|
211
|
-
entrypoints
|
|
212
|
-
);
|
|
213
|
-
if (entrypoint.nestedRoutesEntry && (ssr || useSSG) && name === "server") {
|
|
214
|
-
const serverLoaderRuntime = require.resolve("@modern-js/plugin-data-loader/runtime");
|
|
215
|
-
const serverLoadersFile = (0, import_utils2.getServerLoadersFile)(
|
|
216
|
-
internalDirectory,
|
|
217
|
-
entryName
|
|
218
|
-
);
|
|
219
|
-
const combinedModule = (0, import_builder_shared.createVirtualModule)(
|
|
220
|
-
`export * from "${serverLoaderRuntime}"; export * from "${serverLoadersFile}"`
|
|
221
|
-
);
|
|
222
|
-
chain.entry(`${entryName}-server-loaders`).add(combinedModule);
|
|
223
|
-
}
|
|
224
|
-
});
|
|
225
|
-
}
|
|
226
|
-
}
|
|
227
|
-
};
|
|
228
|
-
},
|
|
229
192
|
resolvedConfig({ resolved }) {
|
|
230
193
|
const appContext = api.useAppContext();
|
|
231
194
|
const config = (0, import_config2.initialNormalizedConfig)(resolved, appContext, bundler);
|
|
@@ -31,12 +31,14 @@ __export(templates_exports, {
|
|
|
31
31
|
html: () => html,
|
|
32
32
|
index: () => index,
|
|
33
33
|
renderFunction: () => renderFunction,
|
|
34
|
-
routesForServer: () => routesForServer
|
|
34
|
+
routesForServer: () => routesForServer,
|
|
35
|
+
ssrLoaderCombinedModule: () => ssrLoaderCombinedModule
|
|
35
36
|
});
|
|
36
37
|
module.exports = __toCommonJS(templates_exports);
|
|
37
38
|
var import_path = __toESM(require("path"));
|
|
38
39
|
var import_utils = require("@modern-js/utils");
|
|
39
40
|
var import_constants = require("./constants");
|
|
41
|
+
var import_utils2 = require("./utils");
|
|
40
42
|
const index = ({
|
|
41
43
|
mountId,
|
|
42
44
|
imports,
|
|
@@ -319,11 +321,33 @@ const fileSystemRoutes = async ({
|
|
|
319
321
|
${routeComponentsCode}
|
|
320
322
|
`;
|
|
321
323
|
};
|
|
324
|
+
function ssrLoaderCombinedModule(entrypoints, entrypoint, config, appContext) {
|
|
325
|
+
const { entryName } = entrypoint;
|
|
326
|
+
const { packageName, internalDirectory } = appContext;
|
|
327
|
+
const ssr = (0, import_utils.getEntryOptions)(
|
|
328
|
+
entryName,
|
|
329
|
+
config.server.ssr,
|
|
330
|
+
config.server.ssrByEntries,
|
|
331
|
+
packageName
|
|
332
|
+
);
|
|
333
|
+
const ssg = (0, import_utils.isSSGEntry)(config, entryName, entrypoints);
|
|
334
|
+
if (entrypoint.nestedRoutesEntry && (ssr || ssg)) {
|
|
335
|
+
const serverLoaderRuntime = require.resolve("@modern-js/plugin-data-loader/runtime");
|
|
336
|
+
const serverLoadersFile = (0, import_utils2.getServerLoadersFile)(
|
|
337
|
+
internalDirectory,
|
|
338
|
+
entryName
|
|
339
|
+
);
|
|
340
|
+
const combinedModule = `export * from "${serverLoaderRuntime}"; export * from "${serverLoadersFile}"`;
|
|
341
|
+
return combinedModule;
|
|
342
|
+
}
|
|
343
|
+
return null;
|
|
344
|
+
}
|
|
322
345
|
// Annotate the CommonJS export names for ESM import in node:
|
|
323
346
|
0 && (module.exports = {
|
|
324
347
|
fileSystemRoutes,
|
|
325
348
|
html,
|
|
326
349
|
index,
|
|
327
350
|
renderFunction,
|
|
328
|
-
routesForServer
|
|
351
|
+
routesForServer,
|
|
352
|
+
ssrLoaderCombinedModule
|
|
329
353
|
});
|
|
@@ -28,6 +28,7 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
|
|
|
28
28
|
var utils_exports = {};
|
|
29
29
|
__export(utils_exports, {
|
|
30
30
|
getDefaultImports: () => getDefaultImports,
|
|
31
|
+
getServerCombinedModueFile: () => getServerCombinedModueFile,
|
|
31
32
|
getServerLoadersFile: () => getServerLoadersFile,
|
|
32
33
|
hasLoader: () => hasLoader,
|
|
33
34
|
isPageComponentFile: () => isPageComponentFile,
|
|
@@ -144,9 +145,13 @@ const hasLoader = async (filename) => {
|
|
|
144
145
|
const getServerLoadersFile = (internalDirectory, entryName) => {
|
|
145
146
|
return import_path.default.join(internalDirectory, entryName, "route-server-loaders.js");
|
|
146
147
|
};
|
|
148
|
+
const getServerCombinedModueFile = (internalDirectory, entryName) => {
|
|
149
|
+
return import_path.default.join(internalDirectory, entryName, "server-loader-combined.js");
|
|
150
|
+
};
|
|
147
151
|
// Annotate the CommonJS export names for ESM import in node:
|
|
148
152
|
0 && (module.exports = {
|
|
149
153
|
getDefaultImports,
|
|
154
|
+
getServerCombinedModueFile,
|
|
150
155
|
getServerLoadersFile,
|
|
151
156
|
hasLoader,
|
|
152
157
|
isPageComponentFile,
|
|
@@ -21,7 +21,9 @@ __export(adapterSSR_exports, {
|
|
|
21
21
|
});
|
|
22
22
|
module.exports = __toCommonJS(adapterSSR_exports);
|
|
23
23
|
var import_builder_shared = require("@modern-js/builder-shared");
|
|
24
|
+
var import_utils = require("@modern-js/utils");
|
|
24
25
|
var import_bundlerPlugins = require("../bundlerPlugins");
|
|
26
|
+
var import_utils2 = require("../../../analyze/utils");
|
|
25
27
|
var import_adapterHtml = require("./adapterHtml");
|
|
26
28
|
const builderPluginAdapterSSR = (options) => ({
|
|
27
29
|
name: "builder-plugin-adapter-modern-ssr",
|
|
@@ -38,9 +40,10 @@ const builderPluginAdapterSSR = (options) => ({
|
|
|
38
40
|
return config;
|
|
39
41
|
});
|
|
40
42
|
api.modifyBundlerChain(
|
|
41
|
-
(chain, { target, CHAIN_ID, isProd, HtmlPlugin: HtmlBundlerPlugin }) => {
|
|
43
|
+
(chain, { target, CHAIN_ID, isProd, HtmlPlugin: HtmlBundlerPlugin, isServer }) => {
|
|
42
44
|
const builderConfig = api.getNormalizedConfig();
|
|
43
45
|
applyRouterPlugin(chain, options);
|
|
46
|
+
applySSRLoaderEntry(chain, options, isServer);
|
|
44
47
|
if (["node", "service-worker"].includes(target)) {
|
|
45
48
|
applyFilterEntriesBySSRConfig({
|
|
46
49
|
isProd,
|
|
@@ -134,6 +137,26 @@ function applyFilterEntriesBySSRConfig({
|
|
|
134
137
|
}
|
|
135
138
|
});
|
|
136
139
|
}
|
|
140
|
+
function applySSRLoaderEntry(chain, optinos, isServer) {
|
|
141
|
+
const { appContext } = optinos;
|
|
142
|
+
const { internalDirectory } = appContext;
|
|
143
|
+
const { entrypoints } = appContext;
|
|
144
|
+
entrypoints.forEach((entrypoint) => {
|
|
145
|
+
const { entryName } = entrypoint;
|
|
146
|
+
const serverLoadersFile = (0, import_utils2.getServerCombinedModueFile)(
|
|
147
|
+
internalDirectory,
|
|
148
|
+
entryName
|
|
149
|
+
);
|
|
150
|
+
if (isServer) {
|
|
151
|
+
import_utils.fs.access(serverLoadersFile, import_utils.fs.constants.F_OK, (err) => {
|
|
152
|
+
if (err) {
|
|
153
|
+
return;
|
|
154
|
+
}
|
|
155
|
+
chain.entry(`${entryName}-server-loaders`).add(serverLoadersFile);
|
|
156
|
+
});
|
|
157
|
+
}
|
|
158
|
+
});
|
|
159
|
+
}
|
|
137
160
|
// Annotate the CommonJS export names for ESM import in node:
|
|
138
161
|
0 && (module.exports = {
|
|
139
162
|
builderPluginAdapterSSR
|
|
@@ -152,7 +152,7 @@ import { fs, getEntryOptions, isRouterV5, isSSGEntry, isUseSSRBundle, logger } f
|
|
|
152
152
|
import * as templates from "./templates";
|
|
153
153
|
import { getClientRoutes, getClientRoutesLegacy } from "./getClientRoutes";
|
|
154
154
|
import { FILE_SYSTEM_ROUTES_FILE_NAME, ENTRY_POINT_FILE_NAME, ENTRY_BOOTSTRAP_FILE_NAME } from "./constants";
|
|
155
|
-
import { getDefaultImports, getServerLoadersFile } from "./utils";
|
|
155
|
+
import { getDefaultImports, getServerLoadersFile, getServerCombinedModueFile } from "./utils";
|
|
156
156
|
import { walk } from "./nestedRoutes";
|
|
157
157
|
var createImportSpecifier = function(specifiers) {
|
|
158
158
|
var defaults = "";
|
|
@@ -245,18 +245,18 @@ var generateCode = function() {
|
|
|
245
245
|
}
|
|
246
246
|
function _generateEntryCode() {
|
|
247
247
|
_generateEntryCode = _asyncToGenerator(function(entrypoint) {
|
|
248
|
-
var entryName, isAutoMount, customBootstrap, fileSystemRoutes, initialRoutes, nestedRoute, routes, config2, ssr, useSSG, mode, hasPageRoute, _ref, code2, _, _tmp, routesServerFile, code3, _ref1, importStatements, plugins, _ref2, renderFunction, exportStatement, code, entryFile, _ref3, asyncEntryCode, bootstrapFile;
|
|
248
|
+
var entryName, isAutoMount, customBootstrap, fileSystemRoutes, initialRoutes, nestedRoute, routes, config2, ssr, useSSG, mode, hasPageRoute, _ref, code2, _, _tmp, routesServerFile, code3, serverLoaderCombined, serverLoaderFile, _ref1, importStatements, plugins, _ref2, renderFunction, exportStatement, code, entryFile, _ref3, asyncEntryCode, bootstrapFile;
|
|
249
249
|
return __generator(this, function(_state) {
|
|
250
250
|
switch(_state.label){
|
|
251
251
|
case 0:
|
|
252
252
|
entryName = entrypoint.entryName, isAutoMount = entrypoint.isAutoMount, customBootstrap = entrypoint.customBootstrap, fileSystemRoutes = entrypoint.fileSystemRoutes;
|
|
253
253
|
if (!isAutoMount) return [
|
|
254
254
|
3,
|
|
255
|
-
|
|
255
|
+
18
|
|
256
256
|
];
|
|
257
257
|
if (!fileSystemRoutes) return [
|
|
258
258
|
3,
|
|
259
|
-
|
|
259
|
+
11
|
|
260
260
|
];
|
|
261
261
|
initialRoutes = [];
|
|
262
262
|
nestedRoute = null;
|
|
@@ -356,9 +356,23 @@ var generateCode = function() {
|
|
|
356
356
|
_state.sent();
|
|
357
357
|
_state.label = 8;
|
|
358
358
|
case 8:
|
|
359
|
-
|
|
360
|
-
|
|
359
|
+
serverLoaderCombined = templates.ssrLoaderCombinedModule(entrypoints, entrypoint, config2, appContext);
|
|
360
|
+
if (!serverLoaderCombined) return [
|
|
361
|
+
3,
|
|
362
|
+
10
|
|
363
|
+
];
|
|
364
|
+
serverLoaderFile = getServerCombinedModueFile(internalDirectory, entryName);
|
|
365
|
+
return [
|
|
366
|
+
4,
|
|
367
|
+
fs.outputFile(serverLoaderFile, serverLoaderCombined)
|
|
368
|
+
];
|
|
361
369
|
case 9:
|
|
370
|
+
_state.sent();
|
|
371
|
+
_state.label = 10;
|
|
372
|
+
case 10:
|
|
373
|
+
fs.outputFileSync(path.resolve(internalDirectory, "./".concat(entryName, "/").concat(FILE_SYSTEM_ROUTES_FILE_NAME)), code2, "utf8");
|
|
374
|
+
_state.label = 11;
|
|
375
|
+
case 11:
|
|
362
376
|
return [
|
|
363
377
|
4,
|
|
364
378
|
hookRunners.modifyEntryImports({
|
|
@@ -372,7 +386,7 @@ var generateCode = function() {
|
|
|
372
386
|
})
|
|
373
387
|
})
|
|
374
388
|
];
|
|
375
|
-
case
|
|
389
|
+
case 12:
|
|
376
390
|
_ref1 = _state.sent(), importStatements = _ref1.imports;
|
|
377
391
|
return [
|
|
378
392
|
4,
|
|
@@ -381,7 +395,7 @@ var generateCode = function() {
|
|
|
381
395
|
plugins: []
|
|
382
396
|
})
|
|
383
397
|
];
|
|
384
|
-
case
|
|
398
|
+
case 13:
|
|
385
399
|
plugins = _state.sent().plugins;
|
|
386
400
|
return [
|
|
387
401
|
4,
|
|
@@ -394,7 +408,7 @@ var generateCode = function() {
|
|
|
394
408
|
})
|
|
395
409
|
})
|
|
396
410
|
];
|
|
397
|
-
case
|
|
411
|
+
case 14:
|
|
398
412
|
_ref2 = _state.sent(), renderFunction = _ref2.code;
|
|
399
413
|
return [
|
|
400
414
|
4,
|
|
@@ -403,7 +417,7 @@ var generateCode = function() {
|
|
|
403
417
|
exportStatement: "export default AppWrapper;"
|
|
404
418
|
})
|
|
405
419
|
];
|
|
406
|
-
case
|
|
420
|
+
case 15:
|
|
407
421
|
exportStatement = _state.sent().exportStatement;
|
|
408
422
|
code = templates.index({
|
|
409
423
|
mountId: mountId,
|
|
@@ -415,7 +429,7 @@ var generateCode = function() {
|
|
|
415
429
|
entrypoint.entry = entryFile;
|
|
416
430
|
if (!config.source.enableAsyncEntry) return [
|
|
417
431
|
3,
|
|
418
|
-
|
|
432
|
+
17
|
|
419
433
|
];
|
|
420
434
|
return [
|
|
421
435
|
4,
|
|
@@ -424,19 +438,19 @@ var generateCode = function() {
|
|
|
424
438
|
code: "import('./".concat(ENTRY_BOOTSTRAP_FILE_NAME, "');")
|
|
425
439
|
})
|
|
426
440
|
];
|
|
427
|
-
case
|
|
441
|
+
case 16:
|
|
428
442
|
_ref3 = _state.sent(), asyncEntryCode = _ref3.code;
|
|
429
443
|
fs.outputFileSync(entryFile, asyncEntryCode, "utf8");
|
|
430
444
|
bootstrapFile = path.resolve(internalDirectory, "./".concat(entryName, "/").concat(ENTRY_BOOTSTRAP_FILE_NAME));
|
|
431
445
|
fs.outputFileSync(bootstrapFile, code, "utf8");
|
|
432
446
|
return [
|
|
433
447
|
3,
|
|
434
|
-
|
|
448
|
+
18
|
|
435
449
|
];
|
|
436
|
-
case
|
|
450
|
+
case 17:
|
|
437
451
|
fs.outputFileSync(entryFile, code, "utf8");
|
|
438
|
-
_state.label =
|
|
439
|
-
case
|
|
452
|
+
_state.label = 18;
|
|
453
|
+
case 18:
|
|
440
454
|
return [
|
|
441
455
|
2
|
|
442
456
|
];
|
|
@@ -221,16 +221,15 @@ var __generator = this && this.__generator || function(thisArg, body) {
|
|
|
221
221
|
}
|
|
222
222
|
};
|
|
223
223
|
import * as path from "path";
|
|
224
|
-
import { createDebugger, findExists, fs,
|
|
224
|
+
import { createDebugger, findExists, fs, isApiOnly, minimist, getCommand, isDevCommand } from "@modern-js/utils";
|
|
225
225
|
import { cloneDeep } from "@modern-js/utils/lodash";
|
|
226
|
-
import { createVirtualModule } from "@modern-js/builder-shared";
|
|
227
226
|
import { printInstructions } from "../utils/printInstructions";
|
|
228
227
|
import { generateRoutes } from "../utils/routes";
|
|
229
228
|
import { emitResolvedConfig } from "../utils/config";
|
|
230
229
|
import { getSelectedEntries } from "../utils/getSelectedEntries";
|
|
231
230
|
import { initialNormalizedConfig } from "../config";
|
|
232
231
|
import { createBuilderGenerator } from "../builder";
|
|
233
|
-
import {
|
|
232
|
+
import { isPageComponentFile, parseModule, replaceWithAlias } from "./utils";
|
|
234
233
|
import { APP_CONFIG_NAME, APP_INIT_EXPORTED, APP_INIT_IMPORTED } from "./constants";
|
|
235
234
|
var debug = createDebugger("plugin-analyze");
|
|
236
235
|
var analyze_default = function(param) {
|
|
@@ -543,29 +542,6 @@ var analyze_default = function(param) {
|
|
|
543
542
|
watchFiles: function watchFiles() {
|
|
544
543
|
return pagesDir;
|
|
545
544
|
},
|
|
546
|
-
config: function config() {
|
|
547
|
-
return {
|
|
548
|
-
tools: {
|
|
549
|
-
webpackChain: function(chain, param) {
|
|
550
|
-
var name = param.name;
|
|
551
|
-
var appContext = api.useAppContext();
|
|
552
|
-
var resolvedConfig = api.useResolvedConfigContext();
|
|
553
|
-
var entrypoints = appContext.entrypoints, internalDirectory = appContext.internalDirectory, packageName = appContext.packageName;
|
|
554
|
-
entrypoints.forEach(function(entrypoint) {
|
|
555
|
-
var entryName = entrypoint.entryName;
|
|
556
|
-
var ssr = getEntryOptions(entryName, resolvedConfig.server.ssr, resolvedConfig.server.ssrByEntries, packageName);
|
|
557
|
-
var useSSG = isSSGEntry(resolvedConfig, entryName, entrypoints);
|
|
558
|
-
if (entrypoint.nestedRoutesEntry && (ssr || useSSG) && name === "server") {
|
|
559
|
-
var serverLoaderRuntime = require.resolve("@modern-js/plugin-data-loader/runtime");
|
|
560
|
-
var serverLoadersFile = getServerLoadersFile(internalDirectory, entryName);
|
|
561
|
-
var combinedModule = createVirtualModule('export * from "'.concat(serverLoaderRuntime, '"; export * from "').concat(serverLoadersFile, '"'));
|
|
562
|
-
chain.entry("".concat(entryName, "-server-loaders")).add(combinedModule);
|
|
563
|
-
}
|
|
564
|
-
});
|
|
565
|
-
}
|
|
566
|
-
}
|
|
567
|
-
};
|
|
568
|
-
},
|
|
569
545
|
resolvedConfig: function resolvedConfig(param) {
|
|
570
546
|
var resolved = param.resolved;
|
|
571
547
|
var appContext = api.useAppContext();
|
|
@@ -221,8 +221,9 @@ var __generator = this && this.__generator || function(thisArg, body) {
|
|
|
221
221
|
}
|
|
222
222
|
};
|
|
223
223
|
import path from "path";
|
|
224
|
-
import { fs, slash } from "@modern-js/utils";
|
|
224
|
+
import { fs, getEntryOptions, isSSGEntry, slash } from "@modern-js/utils";
|
|
225
225
|
import { APP_CONFIG_NAME, TEMP_LOADERS_DIR } from "./constants";
|
|
226
|
+
import { getServerLoadersFile } from "./utils";
|
|
226
227
|
var index = function(param) {
|
|
227
228
|
var mountId = param.mountId, imports = param.imports, renderFunction2 = param.renderFunction, exportStatement = param.exportStatement;
|
|
228
229
|
return "\nconst IS_BROWSER = typeof window !== 'undefined' && window.name !== 'nodejs';\nconst IS_REACT18 = process.env.IS_REACT18 === 'true';\nconst MOUNT_ID = '".concat(mountId, "';\n\n").concat(imports, "\n\nlet AppWrapper = null;\n\nlet root = null;\n\nfunction render() {\n ").concat(renderFunction2, "\n}\n\nAppWrapper = render();\n\n").concat(exportStatement, ";\n");
|
|
@@ -462,4 +463,17 @@ var fileSystemRoutes = function() {
|
|
|
462
463
|
return _ref.apply(this, arguments);
|
|
463
464
|
};
|
|
464
465
|
}();
|
|
465
|
-
|
|
466
|
+
function ssrLoaderCombinedModule(entrypoints, entrypoint, config, appContext) {
|
|
467
|
+
var entryName = entrypoint.entryName;
|
|
468
|
+
var packageName = appContext.packageName, internalDirectory = appContext.internalDirectory;
|
|
469
|
+
var ssr = getEntryOptions(entryName, config.server.ssr, config.server.ssrByEntries, packageName);
|
|
470
|
+
var ssg = isSSGEntry(config, entryName, entrypoints);
|
|
471
|
+
if (entrypoint.nestedRoutesEntry && (ssr || ssg)) {
|
|
472
|
+
var serverLoaderRuntime = require.resolve("@modern-js/plugin-data-loader/runtime");
|
|
473
|
+
var serverLoadersFile = getServerLoadersFile(internalDirectory, entryName);
|
|
474
|
+
var combinedModule = 'export * from "'.concat(serverLoaderRuntime, '"; export * from "').concat(serverLoadersFile, '"');
|
|
475
|
+
return combinedModule;
|
|
476
|
+
}
|
|
477
|
+
return null;
|
|
478
|
+
}
|
|
479
|
+
export { fileSystemRoutes, html, index, renderFunction, routesForServer, ssrLoaderCombinedModule };
|
|
@@ -371,4 +371,7 @@ var hasLoader = function() {
|
|
|
371
371
|
var getServerLoadersFile = function(internalDirectory, entryName) {
|
|
372
372
|
return path.join(internalDirectory, entryName, "route-server-loaders.js");
|
|
373
373
|
};
|
|
374
|
-
|
|
374
|
+
var getServerCombinedModueFile = function(internalDirectory, entryName) {
|
|
375
|
+
return path.join(internalDirectory, entryName, "server-loader-combined.js");
|
|
376
|
+
};
|
|
377
|
+
export { getDefaultImports, getServerCombinedModueFile, getServerLoadersFile, hasLoader, isPageComponentFile, parseModule, replaceWithAlias, walkDirectory };
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import { mergeBuilderConfig } from "@modern-js/builder-shared";
|
|
2
|
+
import { fs } from "@modern-js/utils";
|
|
2
3
|
import { HtmlAsyncChunkPlugin, RouterPlugin } from "../bundlerPlugins";
|
|
4
|
+
import { getServerCombinedModueFile } from "../../../analyze/utils";
|
|
3
5
|
import { isHtmlEnabled } from "./adapterHtml";
|
|
4
6
|
var builderPluginAdapterSSR = function(options) {
|
|
5
7
|
return {
|
|
@@ -17,9 +19,10 @@ var builderPluginAdapterSSR = function(options) {
|
|
|
17
19
|
return config;
|
|
18
20
|
});
|
|
19
21
|
api.modifyBundlerChain(function(chain, param) {
|
|
20
|
-
var target = param.target, CHAIN_ID = param.CHAIN_ID, isProd = param.isProd, HtmlBundlerPlugin = param.HtmlPlugin;
|
|
22
|
+
var target = param.target, CHAIN_ID = param.CHAIN_ID, isProd = param.isProd, HtmlBundlerPlugin = param.HtmlPlugin, isServer = param.isServer;
|
|
21
23
|
var builderConfig = api.getNormalizedConfig();
|
|
22
24
|
applyRouterPlugin(chain, options);
|
|
25
|
+
applySSRLoaderEntry(chain, options, isServer);
|
|
23
26
|
if ([
|
|
24
27
|
"node",
|
|
25
28
|
"service-worker"
|
|
@@ -128,4 +131,21 @@ function applyFilterEntriesBySSRConfig(param) {
|
|
|
128
131
|
}
|
|
129
132
|
});
|
|
130
133
|
}
|
|
134
|
+
function applySSRLoaderEntry(chain, optinos, isServer) {
|
|
135
|
+
var appContext = optinos.appContext;
|
|
136
|
+
var internalDirectory = appContext.internalDirectory;
|
|
137
|
+
var entrypoints = appContext.entrypoints;
|
|
138
|
+
entrypoints.forEach(function(entrypoint) {
|
|
139
|
+
var entryName = entrypoint.entryName;
|
|
140
|
+
var serverLoadersFile = getServerCombinedModueFile(internalDirectory, entryName);
|
|
141
|
+
if (isServer) {
|
|
142
|
+
fs.access(serverLoadersFile, fs.constants.F_OK, function(err) {
|
|
143
|
+
if (err) {
|
|
144
|
+
return;
|
|
145
|
+
}
|
|
146
|
+
chain.entry("".concat(entryName, "-server-loaders")).add(serverLoadersFile);
|
|
147
|
+
});
|
|
148
|
+
}
|
|
149
|
+
});
|
|
150
|
+
}
|
|
131
151
|
export { builderPluginAdapterSSR };
|
|
@@ -14,7 +14,11 @@ import {
|
|
|
14
14
|
ENTRY_POINT_FILE_NAME,
|
|
15
15
|
ENTRY_BOOTSTRAP_FILE_NAME
|
|
16
16
|
} from "./constants";
|
|
17
|
-
import {
|
|
17
|
+
import {
|
|
18
|
+
getDefaultImports,
|
|
19
|
+
getServerLoadersFile,
|
|
20
|
+
getServerCombinedModueFile
|
|
21
|
+
} from "./utils";
|
|
18
22
|
import { walk } from "./nestedRoutes";
|
|
19
23
|
const createImportSpecifier = (specifiers) => {
|
|
20
24
|
let defaults = "";
|
|
@@ -153,6 +157,19 @@ const generateCode = async (appContext, config, entrypoints, api) => {
|
|
|
153
157
|
await fs.ensureFile(routesServerFile);
|
|
154
158
|
await fs.writeFile(routesServerFile, code3);
|
|
155
159
|
}
|
|
160
|
+
const serverLoaderCombined = templates.ssrLoaderCombinedModule(
|
|
161
|
+
entrypoints,
|
|
162
|
+
entrypoint,
|
|
163
|
+
config2,
|
|
164
|
+
appContext
|
|
165
|
+
);
|
|
166
|
+
if (serverLoaderCombined) {
|
|
167
|
+
const serverLoaderFile = getServerCombinedModueFile(
|
|
168
|
+
internalDirectory,
|
|
169
|
+
entryName
|
|
170
|
+
);
|
|
171
|
+
await fs.outputFile(serverLoaderFile, serverLoaderCombined);
|
|
172
|
+
}
|
|
156
173
|
fs.outputFileSync(
|
|
157
174
|
path.resolve(
|
|
158
175
|
internalDirectory,
|
|
@@ -3,27 +3,19 @@ import {
|
|
|
3
3
|
createDebugger,
|
|
4
4
|
findExists,
|
|
5
5
|
fs,
|
|
6
|
-
getEntryOptions,
|
|
7
6
|
isApiOnly,
|
|
8
7
|
minimist,
|
|
9
8
|
getCommand,
|
|
10
|
-
isDevCommand
|
|
11
|
-
isSSGEntry
|
|
9
|
+
isDevCommand
|
|
12
10
|
} from "@modern-js/utils";
|
|
13
11
|
import { cloneDeep } from "@modern-js/utils/lodash";
|
|
14
|
-
import { createVirtualModule } from "@modern-js/builder-shared";
|
|
15
12
|
import { printInstructions } from "../utils/printInstructions";
|
|
16
13
|
import { generateRoutes } from "../utils/routes";
|
|
17
14
|
import { emitResolvedConfig } from "../utils/config";
|
|
18
15
|
import { getSelectedEntries } from "../utils/getSelectedEntries";
|
|
19
16
|
import { initialNormalizedConfig } from "../config";
|
|
20
17
|
import { createBuilderGenerator } from "../builder";
|
|
21
|
-
import {
|
|
22
|
-
getServerLoadersFile,
|
|
23
|
-
isPageComponentFile,
|
|
24
|
-
parseModule,
|
|
25
|
-
replaceWithAlias
|
|
26
|
-
} from "./utils";
|
|
18
|
+
import { isPageComponentFile, parseModule, replaceWithAlias } from "./utils";
|
|
27
19
|
import {
|
|
28
20
|
APP_CONFIG_NAME,
|
|
29
21
|
APP_INIT_EXPORTED,
|
|
@@ -177,42 +169,6 @@ var analyze_default = ({
|
|
|
177
169
|
watchFiles() {
|
|
178
170
|
return pagesDir;
|
|
179
171
|
},
|
|
180
|
-
config() {
|
|
181
|
-
return {
|
|
182
|
-
tools: {
|
|
183
|
-
webpackChain: (chain, { name }) => {
|
|
184
|
-
const appContext = api.useAppContext();
|
|
185
|
-
const resolvedConfig = api.useResolvedConfigContext();
|
|
186
|
-
const { entrypoints, internalDirectory, packageName } = appContext;
|
|
187
|
-
entrypoints.forEach((entrypoint) => {
|
|
188
|
-
const { entryName } = entrypoint;
|
|
189
|
-
const ssr = getEntryOptions(
|
|
190
|
-
entryName,
|
|
191
|
-
resolvedConfig.server.ssr,
|
|
192
|
-
resolvedConfig.server.ssrByEntries,
|
|
193
|
-
packageName
|
|
194
|
-
);
|
|
195
|
-
const useSSG = isSSGEntry(
|
|
196
|
-
resolvedConfig,
|
|
197
|
-
entryName,
|
|
198
|
-
entrypoints
|
|
199
|
-
);
|
|
200
|
-
if (entrypoint.nestedRoutesEntry && (ssr || useSSG) && name === "server") {
|
|
201
|
-
const serverLoaderRuntime = require.resolve("@modern-js/plugin-data-loader/runtime");
|
|
202
|
-
const serverLoadersFile = getServerLoadersFile(
|
|
203
|
-
internalDirectory,
|
|
204
|
-
entryName
|
|
205
|
-
);
|
|
206
|
-
const combinedModule = createVirtualModule(
|
|
207
|
-
`export * from "${serverLoaderRuntime}"; export * from "${serverLoadersFile}"`
|
|
208
|
-
);
|
|
209
|
-
chain.entry(`${entryName}-server-loaders`).add(combinedModule);
|
|
210
|
-
}
|
|
211
|
-
});
|
|
212
|
-
}
|
|
213
|
-
}
|
|
214
|
-
};
|
|
215
|
-
},
|
|
216
172
|
resolvedConfig({ resolved }) {
|
|
217
173
|
const appContext = api.useAppContext();
|
|
218
174
|
const config = initialNormalizedConfig(resolved, appContext, bundler);
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import path from "path";
|
|
2
|
-
import { fs, slash } from "@modern-js/utils";
|
|
2
|
+
import { fs, getEntryOptions, isSSGEntry, slash } from "@modern-js/utils";
|
|
3
3
|
import { APP_CONFIG_NAME, TEMP_LOADERS_DIR } from "./constants";
|
|
4
|
+
import { getServerLoadersFile } from "./utils";
|
|
4
5
|
const index = ({
|
|
5
6
|
mountId,
|
|
6
7
|
imports,
|
|
@@ -283,10 +284,32 @@ const fileSystemRoutes = async ({
|
|
|
283
284
|
${routeComponentsCode}
|
|
284
285
|
`;
|
|
285
286
|
};
|
|
287
|
+
function ssrLoaderCombinedModule(entrypoints, entrypoint, config, appContext) {
|
|
288
|
+
const { entryName } = entrypoint;
|
|
289
|
+
const { packageName, internalDirectory } = appContext;
|
|
290
|
+
const ssr = getEntryOptions(
|
|
291
|
+
entryName,
|
|
292
|
+
config.server.ssr,
|
|
293
|
+
config.server.ssrByEntries,
|
|
294
|
+
packageName
|
|
295
|
+
);
|
|
296
|
+
const ssg = isSSGEntry(config, entryName, entrypoints);
|
|
297
|
+
if (entrypoint.nestedRoutesEntry && (ssr || ssg)) {
|
|
298
|
+
const serverLoaderRuntime = require.resolve("@modern-js/plugin-data-loader/runtime");
|
|
299
|
+
const serverLoadersFile = getServerLoadersFile(
|
|
300
|
+
internalDirectory,
|
|
301
|
+
entryName
|
|
302
|
+
);
|
|
303
|
+
const combinedModule = `export * from "${serverLoaderRuntime}"; export * from "${serverLoadersFile}"`;
|
|
304
|
+
return combinedModule;
|
|
305
|
+
}
|
|
306
|
+
return null;
|
|
307
|
+
}
|
|
286
308
|
export {
|
|
287
309
|
fileSystemRoutes,
|
|
288
310
|
html,
|
|
289
311
|
index,
|
|
290
312
|
renderFunction,
|
|
291
|
-
routesForServer
|
|
313
|
+
routesForServer,
|
|
314
|
+
ssrLoaderCombinedModule
|
|
292
315
|
};
|
|
@@ -110,8 +110,12 @@ const hasLoader = async (filename) => {
|
|
|
110
110
|
const getServerLoadersFile = (internalDirectory, entryName) => {
|
|
111
111
|
return path.join(internalDirectory, entryName, "route-server-loaders.js");
|
|
112
112
|
};
|
|
113
|
+
const getServerCombinedModueFile = (internalDirectory, entryName) => {
|
|
114
|
+
return path.join(internalDirectory, entryName, "server-loader-combined.js");
|
|
115
|
+
};
|
|
113
116
|
export {
|
|
114
117
|
getDefaultImports,
|
|
118
|
+
getServerCombinedModueFile,
|
|
115
119
|
getServerLoadersFile,
|
|
116
120
|
hasLoader,
|
|
117
121
|
isPageComponentFile,
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
mergeBuilderConfig
|
|
3
3
|
} from "@modern-js/builder-shared";
|
|
4
|
+
import { fs } from "@modern-js/utils";
|
|
4
5
|
import { HtmlAsyncChunkPlugin, RouterPlugin } from "../bundlerPlugins";
|
|
6
|
+
import { getServerCombinedModueFile } from "../../../analyze/utils";
|
|
5
7
|
import { isHtmlEnabled } from "./adapterHtml";
|
|
6
8
|
const builderPluginAdapterSSR = (options) => ({
|
|
7
9
|
name: "builder-plugin-adapter-modern-ssr",
|
|
@@ -18,9 +20,10 @@ const builderPluginAdapterSSR = (options) => ({
|
|
|
18
20
|
return config;
|
|
19
21
|
});
|
|
20
22
|
api.modifyBundlerChain(
|
|
21
|
-
(chain, { target, CHAIN_ID, isProd, HtmlPlugin: HtmlBundlerPlugin }) => {
|
|
23
|
+
(chain, { target, CHAIN_ID, isProd, HtmlPlugin: HtmlBundlerPlugin, isServer }) => {
|
|
22
24
|
const builderConfig = api.getNormalizedConfig();
|
|
23
25
|
applyRouterPlugin(chain, options);
|
|
26
|
+
applySSRLoaderEntry(chain, options, isServer);
|
|
24
27
|
if (["node", "service-worker"].includes(target)) {
|
|
25
28
|
applyFilterEntriesBySSRConfig({
|
|
26
29
|
isProd,
|
|
@@ -114,6 +117,26 @@ function applyFilterEntriesBySSRConfig({
|
|
|
114
117
|
}
|
|
115
118
|
});
|
|
116
119
|
}
|
|
120
|
+
function applySSRLoaderEntry(chain, optinos, isServer) {
|
|
121
|
+
const { appContext } = optinos;
|
|
122
|
+
const { internalDirectory } = appContext;
|
|
123
|
+
const { entrypoints } = appContext;
|
|
124
|
+
entrypoints.forEach((entrypoint) => {
|
|
125
|
+
const { entryName } = entrypoint;
|
|
126
|
+
const serverLoadersFile = getServerCombinedModueFile(
|
|
127
|
+
internalDirectory,
|
|
128
|
+
entryName
|
|
129
|
+
);
|
|
130
|
+
if (isServer) {
|
|
131
|
+
fs.access(serverLoadersFile, fs.constants.F_OK, (err) => {
|
|
132
|
+
if (err) {
|
|
133
|
+
return;
|
|
134
|
+
}
|
|
135
|
+
chain.entry(`${entryName}-server-loaders`).add(serverLoadersFile);
|
|
136
|
+
});
|
|
137
|
+
}
|
|
138
|
+
});
|
|
139
|
+
}
|
|
117
140
|
export {
|
|
118
141
|
builderPluginAdapterSSR
|
|
119
142
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { Entrypoint, NestedRoute, PageRoute, RouteLegacy, SSRMode } from '@modern-js/types';
|
|
2
|
-
import type { RuntimePlugin } from '../types';
|
|
2
|
+
import type { AppNormalizedConfig, IAppContext, RuntimePlugin } from '../types';
|
|
3
3
|
export declare const index: ({
|
|
4
4
|
mountId,
|
|
5
5
|
imports,
|
|
@@ -42,4 +42,5 @@ export declare const fileSystemRoutes: ({
|
|
|
42
42
|
nestedRoutesEntry?: string | undefined;
|
|
43
43
|
entryName: string;
|
|
44
44
|
internalDirectory: string;
|
|
45
|
-
}) => Promise<string>;
|
|
45
|
+
}) => Promise<string>;
|
|
46
|
+
export declare function ssrLoaderCombinedModule(entrypoints: Entrypoint[], entrypoint: Entrypoint, config: AppNormalizedConfig<'shared'>, appContext: IAppContext): string | null;
|
|
@@ -24,4 +24,5 @@ export declare const parseModule: ({
|
|
|
24
24
|
filename: string;
|
|
25
25
|
}) => Promise<readonly [imports: readonly import("es-module-lexer").ImportSpecifier[], exports: readonly import("es-module-lexer").ExportSpecifier[], facade: boolean]>;
|
|
26
26
|
export declare const hasLoader: (filename: string) => Promise<boolean>;
|
|
27
|
-
export declare const getServerLoadersFile: (internalDirectory: string, entryName: string) => string;
|
|
27
|
+
export declare const getServerLoadersFile: (internalDirectory: string, entryName: string) => string;
|
|
28
|
+
export declare const getServerCombinedModueFile: (internalDirectory: string, entryName: string) => string;
|
package/package.json
CHANGED
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
"modern",
|
|
12
12
|
"modern.js"
|
|
13
13
|
],
|
|
14
|
-
"version": "0.0.0-next-
|
|
14
|
+
"version": "0.0.0-next-1678282721176",
|
|
15
15
|
"jsnext:source": "./src/index.ts",
|
|
16
16
|
"types": "./dist/types/index.d.ts",
|
|
17
17
|
"main": "./dist/cjs/index.js",
|
|
@@ -64,23 +64,23 @@
|
|
|
64
64
|
"@babel/types": "^7.18.0",
|
|
65
65
|
"es-module-lexer": "^1.1.0",
|
|
66
66
|
"esbuild": "0.15.7",
|
|
67
|
-
"@modern-js/builder": "0.0.0-next-
|
|
68
|
-
"@modern-js/builder-plugin-esbuild": "0.0.0-next-
|
|
69
|
-
"@modern-js/builder-plugin-node-polyfill": "0.0.0-next-
|
|
70
|
-
"@modern-js/builder-
|
|
71
|
-
"@modern-js/builder-
|
|
72
|
-
"@modern-js/core": "0.0.0-next-
|
|
73
|
-
"@modern-js/new-action": "0.0.0-next-
|
|
74
|
-
"@modern-js/node-bundle-require": "0.0.0-next-
|
|
75
|
-
"@modern-js/plugin": "0.0.0-next-
|
|
76
|
-
"@modern-js/plugin-i18n": "0.0.0-next-
|
|
77
|
-
"@modern-js/plugin-data-loader": "0.0.0-next-
|
|
78
|
-
"@modern-js/plugin-lint": "0.0.0-next-
|
|
79
|
-
"@modern-js/prod-server": "0.0.0-next-
|
|
80
|
-
"@modern-js/server": "0.0.0-next-
|
|
81
|
-
"@modern-js/types": "0.0.0-next-
|
|
82
|
-
"@modern-js/upgrade": "0.0.0-next-
|
|
83
|
-
"@modern-js/utils": "0.0.0-next-
|
|
67
|
+
"@modern-js/builder": "0.0.0-next-1678282721176",
|
|
68
|
+
"@modern-js/builder-plugin-esbuild": "0.0.0-next-1678282721176",
|
|
69
|
+
"@modern-js/builder-plugin-node-polyfill": "0.0.0-next-1678282721176",
|
|
70
|
+
"@modern-js/builder-shared": "0.0.0-next-1678282721176",
|
|
71
|
+
"@modern-js/builder-webpack-provider": "0.0.0-next-1678282721176",
|
|
72
|
+
"@modern-js/core": "0.0.0-next-1678282721176",
|
|
73
|
+
"@modern-js/new-action": "0.0.0-next-1678282721176",
|
|
74
|
+
"@modern-js/node-bundle-require": "0.0.0-next-1678282721176",
|
|
75
|
+
"@modern-js/plugin": "0.0.0-next-1678282721176",
|
|
76
|
+
"@modern-js/plugin-i18n": "0.0.0-next-1678282721176",
|
|
77
|
+
"@modern-js/plugin-data-loader": "0.0.0-next-1678282721176",
|
|
78
|
+
"@modern-js/plugin-lint": "0.0.0-next-1678282721176",
|
|
79
|
+
"@modern-js/prod-server": "0.0.0-next-1678282721176",
|
|
80
|
+
"@modern-js/server": "0.0.0-next-1678282721176",
|
|
81
|
+
"@modern-js/types": "0.0.0-next-1678282721176",
|
|
82
|
+
"@modern-js/upgrade": "0.0.0-next-1678282721176",
|
|
83
|
+
"@modern-js/utils": "0.0.0-next-1678282721176"
|
|
84
84
|
},
|
|
85
85
|
"devDependencies": {
|
|
86
86
|
"@types/babel__traverse": "^7.14.2",
|
|
@@ -89,14 +89,14 @@
|
|
|
89
89
|
"jest": "^27",
|
|
90
90
|
"typescript": "^4",
|
|
91
91
|
"webpack": "^5.75.0",
|
|
92
|
-
"@modern-js/builder-plugin-swc": "0.0.0-next-
|
|
93
|
-
"@modern-js/builder-rspack-provider": "0.0.0-next-
|
|
94
|
-
"@modern-js/server-core": "0.0.0-next-
|
|
95
|
-
"@scripts/build": "0.0.0-next-
|
|
96
|
-
"@scripts/jest-config": "0.0.0-next-
|
|
92
|
+
"@modern-js/builder-plugin-swc": "0.0.0-next-1678282721176",
|
|
93
|
+
"@modern-js/builder-rspack-provider": "0.0.0-next-1678282721176",
|
|
94
|
+
"@modern-js/server-core": "0.0.0-next-1678282721176",
|
|
95
|
+
"@scripts/build": "0.0.0-next-1678282721176",
|
|
96
|
+
"@scripts/jest-config": "0.0.0-next-1678282721176"
|
|
97
97
|
},
|
|
98
98
|
"peerDependencies": {
|
|
99
|
-
"@modern-js/builder-rspack-provider": "0.0.0-next-
|
|
99
|
+
"@modern-js/builder-rspack-provider": "0.0.0-next-1678282721176"
|
|
100
100
|
},
|
|
101
101
|
"peerDependenciesMeta": {
|
|
102
102
|
"@modern-js/builder-rspack-provider": {
|