@bleedingdev/modern-js-app-tools 3.4.0-ultramodern.1 → 3.4.0-ultramodern.11
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/dist/cjs/builder/generator/getBuilderEnvironments.js +49 -5
- package/dist/cjs/builder/generator/index.js +1 -0
- package/dist/cjs/builder/shared/builderPlugins/adapterLazyCompilation.js +74 -0
- package/dist/cjs/builder/shared/builderPlugins/adapterSSR.js +3 -28
- package/dist/cjs/builder/shared/builderPlugins/index.js +13 -6
- package/dist/cjs/builder/shared/lazyCompilation.js +11 -3
- package/dist/cjs/esm/register-esm.js +14 -1
- package/dist/cjs/esm/register-esm.mjs +14 -1
- package/dist/cjs/plugins/deploy/index.js +9 -1
- package/dist/cjs/plugins/deploy/platforms/cloudflare.js +13 -4
- package/dist/cjs/rsbuild.js +7 -3
- package/dist/cjs/utils/initAppContext.js +12 -1
- package/dist/esm/builder/generator/getBuilderEnvironments.mjs +49 -5
- package/dist/esm/builder/generator/index.mjs +2 -1
- package/dist/esm/builder/shared/builderPlugins/adapterLazyCompilation.mjs +36 -0
- package/dist/esm/builder/shared/builderPlugins/adapterSSR.mjs +4 -29
- package/dist/esm/builder/shared/builderPlugins/index.mjs +1 -0
- package/dist/esm/builder/shared/lazyCompilation.mjs +6 -4
- package/dist/esm/esm/register-esm.mjs +14 -1
- package/dist/esm/plugins/deploy/index.mjs +9 -1
- package/dist/esm/plugins/deploy/platforms/cloudflare.mjs +13 -4
- package/dist/esm/rsbuild.mjs +7 -3
- package/dist/esm/utils/initAppContext.mjs +12 -1
- package/dist/esm-node/builder/generator/getBuilderEnvironments.mjs +49 -5
- package/dist/esm-node/builder/generator/index.mjs +2 -1
- package/dist/esm-node/builder/shared/builderPlugins/adapterLazyCompilation.mjs +37 -0
- package/dist/esm-node/builder/shared/builderPlugins/adapterSSR.mjs +4 -29
- package/dist/esm-node/builder/shared/builderPlugins/index.mjs +1 -0
- package/dist/esm-node/builder/shared/lazyCompilation.mjs +6 -4
- package/dist/esm-node/esm/register-esm.mjs +14 -1
- package/dist/esm-node/plugins/deploy/index.mjs +9 -1
- package/dist/esm-node/plugins/deploy/platforms/cloudflare.mjs +13 -4
- package/dist/esm-node/rsbuild.mjs +7 -3
- package/dist/esm-node/utils/initAppContext.mjs +12 -1
- package/dist/types/builder/shared/builderPlugins/adapterLazyCompilation.d.ts +3 -0
- package/dist/types/builder/shared/builderPlugins/index.d.ts +1 -0
- package/dist/types/builder/shared/lazyCompilation.d.ts +7 -5
- package/dist/types/builder/shared/types.d.ts +3 -3
- package/dist/types/esm/register-esm.d.mts +1 -1
- package/dist/types/rsbuild.d.ts +1 -0
- package/package.json +21 -29
|
@@ -15,8 +15,8 @@ export type EagerRouteComponentInfo = {
|
|
|
15
15
|
* Aggregate the per-entry route component data (collected by the router plugin
|
|
16
16
|
* during route generation and threaded in as
|
|
17
17
|
* `BuilderOptions.eagerRouteComponentFilesByEntry`) into the flat shape
|
|
18
|
-
* {@link
|
|
19
|
-
* unresolved specifiers keyed by entry.
|
|
18
|
+
* {@link planRouteEagerLazyCompilation} expects: one Set of all route files
|
|
19
|
+
* plus the unresolved specifiers keyed by entry.
|
|
20
20
|
*/
|
|
21
21
|
export declare function aggregateEagerRouteComponentFiles(byEntry: EagerRouteComponentFilesByEntry | undefined): EagerRouteComponentInfo;
|
|
22
22
|
/**
|
|
@@ -25,7 +25,8 @@ export declare function aggregateEagerRouteComponentFiles(byEntry: EagerRouteCom
|
|
|
25
25
|
* render time), while delegating all other modules to the user's `test`
|
|
26
26
|
* (defaulting to lazy when the user did not provide one).
|
|
27
27
|
*/
|
|
28
|
-
export declare function
|
|
28
|
+
export declare function buildRouteEagerLazyCompilationTest(eagerRouteFiles: Set<string>, userTest?: LazyCompilationTest): LazyCompilationTestFn;
|
|
29
|
+
export declare const buildSSRLazyCompilationTest: typeof buildRouteEagerLazyCompilationTest;
|
|
29
30
|
export type SSRLazyPlan = {
|
|
30
31
|
apply: false;
|
|
31
32
|
unresolvedByEntry?: Map<string, string[]>;
|
|
@@ -34,10 +35,11 @@ export type SSRLazyPlan = {
|
|
|
34
35
|
lazyCompilation: Record<string, unknown>;
|
|
35
36
|
};
|
|
36
37
|
/**
|
|
37
|
-
* Decide whether to apply
|
|
38
|
+
* Decide whether to apply route-eager lazy compilation for a project.
|
|
38
39
|
* Checks unresolved route components FIRST: if any exist we cannot guarantee
|
|
39
40
|
* they are eager, so we skip the optimization (and surface them so the caller
|
|
40
41
|
* can warn) rather than silently leaving a route lazy. `current` is the
|
|
41
42
|
* existing `dev.lazyCompilation` value (lazy must be enabled for this to apply).
|
|
42
43
|
*/
|
|
43
|
-
export declare function
|
|
44
|
+
export declare function planRouteEagerLazyCompilation(current: unknown, info: EagerRouteComponentInfo): SSRLazyPlan;
|
|
45
|
+
export declare const planSSRLazyCompilation: typeof planRouteEagerLazyCompilation;
|
|
@@ -8,9 +8,9 @@ export type BuilderOptions = {
|
|
|
8
8
|
* Route component files collected from the FINAL file-system routes (after
|
|
9
9
|
* all `modifyFileSystemRoutes` consumers ran), keyed by entry name. Populated
|
|
10
10
|
* by the router plugin during route generation and threaded in here (read
|
|
11
|
-
* FRESH from the app context AFTER `generateEntryCode` runs) so
|
|
12
|
-
*
|
|
13
|
-
*
|
|
11
|
+
* FRESH from the app context AFTER `generateEntryCode` runs) so builder
|
|
12
|
+
* plugins can force route component chunks eager under lazy compilation.
|
|
13
|
+
* Explicit param instead of a direct `_internalContext` read.
|
|
14
14
|
*/
|
|
15
15
|
eagerRouteComponentFilesByEntry?: EagerRouteComponentFilesByEntry;
|
|
16
16
|
};
|
package/dist/types/rsbuild.d.ts
CHANGED
package/package.json
CHANGED
|
@@ -17,40 +17,32 @@
|
|
|
17
17
|
"modern",
|
|
18
18
|
"modern.js"
|
|
19
19
|
],
|
|
20
|
-
"version": "3.4.0-ultramodern.
|
|
20
|
+
"version": "3.4.0-ultramodern.11",
|
|
21
21
|
"types": "./dist/types/index.d.ts",
|
|
22
22
|
"main": "./dist/cjs/index.js",
|
|
23
23
|
"exports": {
|
|
24
24
|
".": {
|
|
25
25
|
"types": "./dist/types/index.d.ts",
|
|
26
|
-
"
|
|
27
|
-
|
|
28
|
-
"require": "./dist/cjs/index.js"
|
|
29
|
-
},
|
|
26
|
+
"import": "./dist/esm-node/index.mjs",
|
|
27
|
+
"require": "./dist/cjs/index.js",
|
|
30
28
|
"default": "./dist/cjs/index.js"
|
|
31
29
|
},
|
|
32
30
|
"./builder": {
|
|
33
31
|
"types": "./dist/types/builder/index.d.ts",
|
|
34
|
-
"
|
|
35
|
-
|
|
36
|
-
"require": "./dist/cjs/builder/index.js"
|
|
37
|
-
},
|
|
32
|
+
"import": "./dist/esm-node/builder/index.mjs",
|
|
33
|
+
"require": "./dist/cjs/builder/index.js",
|
|
38
34
|
"default": "./dist/cjs/builder/index.js"
|
|
39
35
|
},
|
|
40
36
|
"./cli": {
|
|
41
37
|
"types": "./dist/types/index.d.ts",
|
|
42
|
-
"
|
|
43
|
-
|
|
44
|
-
"require": "./dist/cjs/index.js"
|
|
45
|
-
},
|
|
38
|
+
"import": "./dist/esm-node/index.mjs",
|
|
39
|
+
"require": "./dist/cjs/index.js",
|
|
46
40
|
"default": "./dist/cjs/index.js"
|
|
47
41
|
},
|
|
48
42
|
"./cli/run": {
|
|
49
43
|
"types": "./dist/types/run/index.d.ts",
|
|
50
|
-
"
|
|
51
|
-
|
|
52
|
-
"require": "./dist/cjs/run/index.js"
|
|
53
|
-
},
|
|
44
|
+
"import": "./dist/esm-node/run/index.mjs",
|
|
45
|
+
"require": "./dist/cjs/run/index.js",
|
|
54
46
|
"default": "./dist/cjs/run/index.js"
|
|
55
47
|
},
|
|
56
48
|
"./types": {
|
|
@@ -86,7 +78,7 @@
|
|
|
86
78
|
"@babel/traverse": "^8.0.0",
|
|
87
79
|
"@babel/types": "^8.0.0",
|
|
88
80
|
"@loadable/component": "5.16.7",
|
|
89
|
-
"@rsbuild/core": "2.0
|
|
81
|
+
"@rsbuild/core": "2.1.0",
|
|
90
82
|
"@swc/core": "1.15.43",
|
|
91
83
|
"@swc/helpers": "^0.5.23",
|
|
92
84
|
"compression-webpack-plugin": "^12.0.0",
|
|
@@ -98,21 +90,21 @@
|
|
|
98
90
|
"ndepe": "^0.1.13",
|
|
99
91
|
"pkg-types": "^2.3.1",
|
|
100
92
|
"std-env": "4.1.0",
|
|
101
|
-
"@modern-js/builder": "npm:@bleedingdev/modern-js-builder@3.4.0-ultramodern.
|
|
102
|
-
"@modern-js/plugin": "npm:@bleedingdev/modern-js-plugin@3.4.0-ultramodern.
|
|
103
|
-
"@modern-js/
|
|
104
|
-
"@modern-js/
|
|
105
|
-
"@modern-js/
|
|
106
|
-
"@modern-js/server-core": "npm:@bleedingdev/modern-js-server-core@3.4.0-ultramodern.
|
|
107
|
-
"@modern-js/
|
|
108
|
-
"@modern-js/
|
|
109
|
-
"@modern-js/
|
|
110
|
-
"@modern-js/
|
|
93
|
+
"@modern-js/builder": "npm:@bleedingdev/modern-js-builder@3.4.0-ultramodern.11",
|
|
94
|
+
"@modern-js/plugin": "npm:@bleedingdev/modern-js-plugin@3.4.0-ultramodern.11",
|
|
95
|
+
"@modern-js/plugin-data-loader": "npm:@bleedingdev/modern-js-plugin-data-loader@3.4.0-ultramodern.11",
|
|
96
|
+
"@modern-js/prod-server": "npm:@bleedingdev/modern-js-prod-server@3.4.0-ultramodern.11",
|
|
97
|
+
"@modern-js/i18n-utils": "npm:@bleedingdev/modern-js-i18n-utils@3.4.0-ultramodern.11",
|
|
98
|
+
"@modern-js/server-core": "npm:@bleedingdev/modern-js-server-core@3.4.0-ultramodern.11",
|
|
99
|
+
"@modern-js/utils": "npm:@bleedingdev/modern-js-utils@3.4.0-ultramodern.11",
|
|
100
|
+
"@modern-js/server-utils": "npm:@bleedingdev/modern-js-server-utils@3.4.0-ultramodern.11",
|
|
101
|
+
"@modern-js/types": "npm:@bleedingdev/modern-js-types@3.4.0-ultramodern.11",
|
|
102
|
+
"@modern-js/server": "npm:@bleedingdev/modern-js-server@3.4.0-ultramodern.11"
|
|
111
103
|
},
|
|
112
104
|
"devDependencies": {
|
|
113
105
|
"@rslib/core": "0.23.0",
|
|
114
106
|
"@types/babel__traverse": "7.28.0",
|
|
115
|
-
"@types/node": "^26.0.
|
|
107
|
+
"@types/node": "^26.0.1",
|
|
116
108
|
"@typescript/native-preview": "7.0.0-dev.20260624.1",
|
|
117
109
|
"ts-node": "^10.9.2",
|
|
118
110
|
"tsconfig-paths": "^4.2.0",
|