@bleedingdev/modern-js-builder 3.2.0-ultramodern.9 → 3.2.0-ultramodern.90
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/plugins/environmentDefaults.js +5 -1
- package/dist/cjs/plugins/rscConfig.js +6 -1
- package/dist/esm/plugins/environmentDefaults.mjs +5 -1
- package/dist/esm/plugins/rscConfig.mjs +6 -1
- package/dist/esm-node/plugins/environmentDefaults.mjs +5 -1
- package/dist/esm-node/plugins/rscConfig.mjs +6 -1
- package/package.json +10 -10
|
@@ -84,7 +84,11 @@ const pluginEnvironmentDefaults = (distPath = {})=>({
|
|
|
84
84
|
});
|
|
85
85
|
api.modifyBundlerChain(async (chain, { environment })=>{
|
|
86
86
|
const isServiceWorker = environment.name === utils_js_namespaceObject.SERVICE_WORKER_ENVIRONMENT_NAME;
|
|
87
|
-
if (isServiceWorker) chain.output.library({
|
|
87
|
+
if (isServiceWorker && true === chain.output.get('module')) chain.output.library({
|
|
88
|
+
...chain.output.get('library') || {},
|
|
89
|
+
type: 'module'
|
|
90
|
+
});
|
|
91
|
+
else if (isServiceWorker) chain.output.library({
|
|
88
92
|
...chain.output.get('library') || {},
|
|
89
93
|
type: 'commonjs2'
|
|
90
94
|
});
|
|
@@ -39,6 +39,9 @@ __webpack_require__.d(__webpack_exports__, {
|
|
|
39
39
|
const external_path_namespaceObject = require("path");
|
|
40
40
|
var external_path_default = /*#__PURE__*/ __webpack_require__.n(external_path_namespaceObject);
|
|
41
41
|
const ASYNC_STORAGE_PATTERN = /universal[/\\]async_storage/;
|
|
42
|
+
const SERVER_LOADER_ENTRY_PATTERN = /[/\\](?:server-loader-combined|route-server-loaders)\.js$/;
|
|
43
|
+
const RENDER_RSC_SOURCE_PATTERN = /render[/\\].*[/\\]server[/\\]rsc/;
|
|
44
|
+
const RENDER_RSC_RSLIB_ENTRY_PATTERN = /render[/\\]dist[/\\]esm[/\\]rsc\.mjs$/;
|
|
42
45
|
const RSC_COMMON_LAYER = 'rsc-common';
|
|
43
46
|
const ENTRY_NAME_VAR = '__MODERN_JS_ENTRY_NAME';
|
|
44
47
|
const createVirtualModule = (content)=>`data:text/javascript,${encodeURIComponent(content)}`;
|
|
@@ -136,8 +139,10 @@ async function getRscPlugins(enableRsc, internalDirectory) {
|
|
|
136
139
|
return [
|
|
137
140
|
pluginRSC({
|
|
138
141
|
layers: {
|
|
142
|
+
ssr: SERVER_LOADER_ENTRY_PATTERN,
|
|
139
143
|
rsc: [
|
|
140
|
-
|
|
144
|
+
RENDER_RSC_SOURCE_PATTERN,
|
|
145
|
+
RENDER_RSC_RSLIB_ENTRY_PATTERN,
|
|
141
146
|
/AppProxy/,
|
|
142
147
|
routesFileReg
|
|
143
148
|
]
|
|
@@ -56,7 +56,11 @@ const pluginEnvironmentDefaults = (distPath = {})=>({
|
|
|
56
56
|
});
|
|
57
57
|
api.modifyBundlerChain(async (chain, { environment })=>{
|
|
58
58
|
const isServiceWorker = environment.name === SERVICE_WORKER_ENVIRONMENT_NAME;
|
|
59
|
-
if (isServiceWorker) chain.output.library({
|
|
59
|
+
if (isServiceWorker && true === chain.output.get('module')) chain.output.library({
|
|
60
|
+
...chain.output.get('library') || {},
|
|
61
|
+
type: 'module'
|
|
62
|
+
});
|
|
63
|
+
else if (isServiceWorker) chain.output.library({
|
|
60
64
|
...chain.output.get('library') || {},
|
|
61
65
|
type: 'commonjs2'
|
|
62
66
|
});
|
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
import path from "path";
|
|
2
2
|
const ASYNC_STORAGE_PATTERN = /universal[/\\]async_storage/;
|
|
3
|
+
const SERVER_LOADER_ENTRY_PATTERN = /[/\\](?:server-loader-combined|route-server-loaders)\.js$/;
|
|
4
|
+
const RENDER_RSC_SOURCE_PATTERN = /render[/\\].*[/\\]server[/\\]rsc/;
|
|
5
|
+
const RENDER_RSC_RSLIB_ENTRY_PATTERN = /render[/\\]dist[/\\]esm[/\\]rsc\.mjs$/;
|
|
3
6
|
const RSC_COMMON_LAYER = 'rsc-common';
|
|
4
7
|
const ENTRY_NAME_VAR = '__MODERN_JS_ENTRY_NAME';
|
|
5
8
|
const createVirtualModule = (content)=>`data:text/javascript,${encodeURIComponent(content)}`;
|
|
@@ -97,8 +100,10 @@ async function getRscPlugins(enableRsc, internalDirectory) {
|
|
|
97
100
|
return [
|
|
98
101
|
pluginRSC({
|
|
99
102
|
layers: {
|
|
103
|
+
ssr: SERVER_LOADER_ENTRY_PATTERN,
|
|
100
104
|
rsc: [
|
|
101
|
-
|
|
105
|
+
RENDER_RSC_SOURCE_PATTERN,
|
|
106
|
+
RENDER_RSC_RSLIB_ENTRY_PATTERN,
|
|
102
107
|
/AppProxy/,
|
|
103
108
|
routesFileReg
|
|
104
109
|
]
|
|
@@ -57,7 +57,11 @@ const pluginEnvironmentDefaults = (distPath = {})=>({
|
|
|
57
57
|
});
|
|
58
58
|
api.modifyBundlerChain(async (chain, { environment })=>{
|
|
59
59
|
const isServiceWorker = environment.name === SERVICE_WORKER_ENVIRONMENT_NAME;
|
|
60
|
-
if (isServiceWorker) chain.output.library({
|
|
60
|
+
if (isServiceWorker && true === chain.output.get('module')) chain.output.library({
|
|
61
|
+
...chain.output.get('library') || {},
|
|
62
|
+
type: 'module'
|
|
63
|
+
});
|
|
64
|
+
else if (isServiceWorker) chain.output.library({
|
|
61
65
|
...chain.output.get('library') || {},
|
|
62
66
|
type: 'commonjs2'
|
|
63
67
|
});
|
|
@@ -5,6 +5,9 @@ import { fileURLToPath as __rspack_fileURLToPath } from "node:url";
|
|
|
5
5
|
import { dirname as __rspack_dirname } from "node:path";
|
|
6
6
|
var rscConfig_dirname = __rspack_dirname(__rspack_fileURLToPath(import.meta.url));
|
|
7
7
|
const ASYNC_STORAGE_PATTERN = /universal[/\\]async_storage/;
|
|
8
|
+
const SERVER_LOADER_ENTRY_PATTERN = /[/\\](?:server-loader-combined|route-server-loaders)\.js$/;
|
|
9
|
+
const RENDER_RSC_SOURCE_PATTERN = /render[/\\].*[/\\]server[/\\]rsc/;
|
|
10
|
+
const RENDER_RSC_RSLIB_ENTRY_PATTERN = /render[/\\]dist[/\\]esm[/\\]rsc\.mjs$/;
|
|
8
11
|
const RSC_COMMON_LAYER = 'rsc-common';
|
|
9
12
|
const ENTRY_NAME_VAR = '__MODERN_JS_ENTRY_NAME';
|
|
10
13
|
const createVirtualModule = (content)=>`data:text/javascript,${encodeURIComponent(content)}`;
|
|
@@ -102,8 +105,10 @@ async function getRscPlugins(enableRsc, internalDirectory) {
|
|
|
102
105
|
return [
|
|
103
106
|
pluginRSC({
|
|
104
107
|
layers: {
|
|
108
|
+
ssr: SERVER_LOADER_ENTRY_PATTERN,
|
|
105
109
|
rsc: [
|
|
106
|
-
|
|
110
|
+
RENDER_RSC_SOURCE_PATTERN,
|
|
111
|
+
RENDER_RSC_RSLIB_ENTRY_PATTERN,
|
|
107
112
|
/AppProxy/,
|
|
108
113
|
routesFileReg
|
|
109
114
|
]
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bleedingdev/modern-js-builder",
|
|
3
|
-
"version": "3.2.0-ultramodern.
|
|
3
|
+
"version": "3.2.0-ultramodern.90",
|
|
4
4
|
"description": "A builder for Modern.js",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
"dist"
|
|
27
27
|
],
|
|
28
28
|
"dependencies": {
|
|
29
|
-
"@rsbuild/core": "2.0.
|
|
29
|
+
"@rsbuild/core": "2.0.7",
|
|
30
30
|
"@rsbuild/plugin-assets-retry": "2.0.0",
|
|
31
31
|
"@rsbuild/plugin-check-syntax": "1.6.1",
|
|
32
32
|
"@rsbuild/plugin-css-minimizer": "2.0.0",
|
|
@@ -39,15 +39,15 @@
|
|
|
39
39
|
"@rsbuild/plugin-type-check": "1.3.4",
|
|
40
40
|
"@rsbuild/plugin-typed-css-modules": "1.2.2",
|
|
41
41
|
"@rsdoctor/rspack-plugin": "^1.5.11",
|
|
42
|
-
"@swc/core": "1.15.
|
|
43
|
-
"@swc/helpers": "^0.5.
|
|
42
|
+
"@swc/core": "1.15.40",
|
|
43
|
+
"@swc/helpers": "^0.5.23",
|
|
44
44
|
"autoprefixer": "10.5.0",
|
|
45
45
|
"browserslist": "4.28.2",
|
|
46
46
|
"core-js": "^3.49.0",
|
|
47
47
|
"cssnano": "8.0.1",
|
|
48
48
|
"html-minifier-terser": "^7.2.0",
|
|
49
49
|
"lodash": "^4.18.1",
|
|
50
|
-
"postcss": "^8.5.
|
|
50
|
+
"postcss": "^8.5.15",
|
|
51
51
|
"postcss-custom-properties": "15.0.1",
|
|
52
52
|
"postcss-flexbugs-fixes": "5.0.2",
|
|
53
53
|
"postcss-font-variant": "5.0.0",
|
|
@@ -58,17 +58,17 @@
|
|
|
58
58
|
"postcss-page-break": "3.0.4",
|
|
59
59
|
"rsbuild-plugin-rsc": "0.1.0",
|
|
60
60
|
"rspack-manifest-plugin": "5.2.1",
|
|
61
|
-
"ts-deepmerge": "
|
|
62
|
-
"@modern-js/utils": "npm:@bleedingdev/modern-js-utils@3.2.0-ultramodern.
|
|
61
|
+
"ts-deepmerge": "8.0.0",
|
|
62
|
+
"@modern-js/utils": "npm:@bleedingdev/modern-js-utils@3.2.0-ultramodern.90"
|
|
63
63
|
},
|
|
64
64
|
"devDependencies": {
|
|
65
65
|
"@rslib/core": "0.21.5",
|
|
66
66
|
"@types/html-minifier-terser": "^7.0.2",
|
|
67
67
|
"@types/lodash": "^4.17.24",
|
|
68
|
-
"@typescript/native-preview": "7.0.0-dev.
|
|
68
|
+
"@typescript/native-preview": "7.0.0-dev.20260527.2",
|
|
69
69
|
"react": "^19.2.6",
|
|
70
|
-
"terser": "^5.
|
|
71
|
-
"@modern-js/types": "npm:@bleedingdev/modern-js-types@3.2.0-ultramodern.
|
|
70
|
+
"terser": "^5.48.0",
|
|
71
|
+
"@modern-js/types": "npm:@bleedingdev/modern-js-types@3.2.0-ultramodern.90",
|
|
72
72
|
"@scripts/rstest-config": "2.66.0"
|
|
73
73
|
},
|
|
74
74
|
"publishConfig": {
|