@modern-js/app-tools 3.0.0 → 3.0.2
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 +3 -3
- package/dist/cjs/builder/generator/index.js +1 -1
- package/dist/esm/builder/generator/getBuilderEnvironments.mjs +3 -3
- package/dist/esm/builder/generator/index.mjs +1 -1
- package/dist/esm-node/builder/generator/getBuilderEnvironments.mjs +3 -3
- package/dist/esm-node/builder/generator/index.mjs +1 -1
- package/package.json +13 -13
|
@@ -45,7 +45,7 @@ function getBuilderEnvironments(normalizedConfig, appContext, tempBuilderConfig)
|
|
|
45
45
|
serverEntries[entry] = v.map((entry)=>entry.replace('index.jsx', 'index.server.jsx')).map((entry)=>entry.replace('bootstrap.jsx', 'bootstrap.server.jsx'));
|
|
46
46
|
}
|
|
47
47
|
const environments = {
|
|
48
|
-
|
|
48
|
+
client: {
|
|
49
49
|
output: {
|
|
50
50
|
target: 'web'
|
|
51
51
|
},
|
|
@@ -55,11 +55,11 @@ function getBuilderEnvironments(normalizedConfig, appContext, tempBuilderConfig)
|
|
|
55
55
|
}
|
|
56
56
|
};
|
|
57
57
|
if (tempBuilderConfig.output?.copy) {
|
|
58
|
-
environments.
|
|
58
|
+
environments.client.output.copy = tempBuilderConfig.output.copy;
|
|
59
59
|
delete tempBuilderConfig.output.copy;
|
|
60
60
|
}
|
|
61
61
|
const useNodeTarget = (0, utils_namespaceObject.isUseRsc)(normalizedConfig) || ((0, utils_namespaceObject.isProd)() ? (0, utils_namespaceObject.isUseSSRBundle)(normalizedConfig) : (0, utils_namespaceObject.isSSR)(normalizedConfig));
|
|
62
|
-
if (useNodeTarget) environments.
|
|
62
|
+
if (useNodeTarget) environments.server = {
|
|
63
63
|
output: {
|
|
64
64
|
target: 'node'
|
|
65
65
|
},
|
|
@@ -66,7 +66,7 @@ async function applyBuilderPlugins(builder, options) {
|
|
|
66
66
|
builder.addPlugins([
|
|
67
67
|
(0, external_adapterCopy_js_namespaceObject.builderPluginAdapterCopy)(options)
|
|
68
68
|
], {
|
|
69
|
-
environment: '
|
|
69
|
+
environment: 'client'
|
|
70
70
|
});
|
|
71
71
|
const { normalizedConfig } = options;
|
|
72
72
|
}
|
|
@@ -17,7 +17,7 @@ function getBuilderEnvironments(normalizedConfig, appContext, tempBuilderConfig)
|
|
|
17
17
|
serverEntries[entry] = v.map((entry)=>entry.replace('index.jsx', 'index.server.jsx')).map((entry)=>entry.replace('bootstrap.jsx', 'bootstrap.server.jsx'));
|
|
18
18
|
}
|
|
19
19
|
const environments = {
|
|
20
|
-
|
|
20
|
+
client: {
|
|
21
21
|
output: {
|
|
22
22
|
target: 'web'
|
|
23
23
|
},
|
|
@@ -27,11 +27,11 @@ function getBuilderEnvironments(normalizedConfig, appContext, tempBuilderConfig)
|
|
|
27
27
|
}
|
|
28
28
|
};
|
|
29
29
|
if (tempBuilderConfig.output?.copy) {
|
|
30
|
-
environments.
|
|
30
|
+
environments.client.output.copy = tempBuilderConfig.output.copy;
|
|
31
31
|
delete tempBuilderConfig.output.copy;
|
|
32
32
|
}
|
|
33
33
|
const useNodeTarget = isUseRsc(normalizedConfig) || (isProd() ? isUseSSRBundle(normalizedConfig) : isSSR(normalizedConfig));
|
|
34
|
-
if (useNodeTarget) environments.
|
|
34
|
+
if (useNodeTarget) environments.server = {
|
|
35
35
|
output: {
|
|
36
36
|
target: 'node'
|
|
37
37
|
},
|
|
@@ -18,7 +18,7 @@ function getBuilderEnvironments(normalizedConfig, appContext, tempBuilderConfig)
|
|
|
18
18
|
serverEntries[entry] = v.map((entry)=>entry.replace('index.jsx', 'index.server.jsx')).map((entry)=>entry.replace('bootstrap.jsx', 'bootstrap.server.jsx'));
|
|
19
19
|
}
|
|
20
20
|
const environments = {
|
|
21
|
-
|
|
21
|
+
client: {
|
|
22
22
|
output: {
|
|
23
23
|
target: 'web'
|
|
24
24
|
},
|
|
@@ -28,11 +28,11 @@ function getBuilderEnvironments(normalizedConfig, appContext, tempBuilderConfig)
|
|
|
28
28
|
}
|
|
29
29
|
};
|
|
30
30
|
if (tempBuilderConfig.output?.copy) {
|
|
31
|
-
environments.
|
|
31
|
+
environments.client.output.copy = tempBuilderConfig.output.copy;
|
|
32
32
|
delete tempBuilderConfig.output.copy;
|
|
33
33
|
}
|
|
34
34
|
const useNodeTarget = isUseRsc(normalizedConfig) || (isProd() ? isUseSSRBundle(normalizedConfig) : isSSR(normalizedConfig));
|
|
35
|
-
if (useNodeTarget) environments.
|
|
35
|
+
if (useNodeTarget) environments.server = {
|
|
36
36
|
output: {
|
|
37
37
|
target: 'node'
|
|
38
38
|
},
|
package/package.json
CHANGED
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
"modern",
|
|
16
16
|
"modern.js"
|
|
17
17
|
],
|
|
18
|
-
"version": "3.0.
|
|
18
|
+
"version": "3.0.2",
|
|
19
19
|
"types": "./dist/types/index.d.ts",
|
|
20
20
|
"main": "./dist/cjs/index.js",
|
|
21
21
|
"exports": {
|
|
@@ -83,7 +83,7 @@
|
|
|
83
83
|
"@babel/parser": "^7.28.6",
|
|
84
84
|
"@babel/traverse": "^7.28.6",
|
|
85
85
|
"@babel/types": "^7.28.6",
|
|
86
|
-
"@rsbuild/core": "2.0.0-beta.
|
|
86
|
+
"@rsbuild/core": "2.0.0-beta.4",
|
|
87
87
|
"@swc/helpers": "^0.5.17",
|
|
88
88
|
"es-module-lexer": "^1.7.0",
|
|
89
89
|
"esbuild": "0.25.5",
|
|
@@ -93,19 +93,19 @@
|
|
|
93
93
|
"ndepe": "^0.1.13",
|
|
94
94
|
"pkg-types": "^1.3.1",
|
|
95
95
|
"std-env": "^3.10.0",
|
|
96
|
-
"@modern-js/builder": "3.0.
|
|
97
|
-
"@modern-js/i18n-utils": "3.0.
|
|
98
|
-
"@modern-js/plugin": "3.0.
|
|
99
|
-
"@modern-js/plugin-data-loader": "3.0.
|
|
100
|
-
"@modern-js/prod-server": "3.0.
|
|
101
|
-
"@modern-js/server": "3.0.
|
|
102
|
-
"@modern-js/server
|
|
103
|
-
"@modern-js/server-
|
|
104
|
-
"@modern-js/
|
|
105
|
-
"@modern-js/
|
|
96
|
+
"@modern-js/builder": "3.0.2",
|
|
97
|
+
"@modern-js/i18n-utils": "3.0.2",
|
|
98
|
+
"@modern-js/plugin": "3.0.2",
|
|
99
|
+
"@modern-js/plugin-data-loader": "3.0.2",
|
|
100
|
+
"@modern-js/prod-server": "3.0.2",
|
|
101
|
+
"@modern-js/server-core": "3.0.2",
|
|
102
|
+
"@modern-js/server": "3.0.2",
|
|
103
|
+
"@modern-js/server-utils": "3.0.2",
|
|
104
|
+
"@modern-js/utils": "3.0.2",
|
|
105
|
+
"@modern-js/types": "3.0.2"
|
|
106
106
|
},
|
|
107
107
|
"devDependencies": {
|
|
108
|
-
"@rslib/core": "0.19.
|
|
108
|
+
"@rslib/core": "0.19.5",
|
|
109
109
|
"@types/babel__traverse": "7.28.0",
|
|
110
110
|
"@types/node": "^20",
|
|
111
111
|
"ts-node": "^10.9.2",
|