@bleedingdev/modern-js-app-tools 3.2.0-ultramodern.11 → 3.2.0-ultramodern.13
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.
|
@@ -122,9 +122,10 @@ function applyFilterEntriesBySSRConfig({ isProd, chain, appNormalizedConfig }) {
|
|
|
122
122
|
});
|
|
123
123
|
}
|
|
124
124
|
async function applySSRLoaderEntry(chain, optinos, isServer) {
|
|
125
|
-
const { appContext } = optinos;
|
|
125
|
+
const { appContext, normalizedConfig } = optinos;
|
|
126
126
|
const { internalDirectory } = appContext;
|
|
127
127
|
const { entrypoints } = appContext;
|
|
128
|
+
const isRsc = (0, utils_namespaceObject.isUseRsc)(normalizedConfig);
|
|
128
129
|
await Promise.all(entrypoints.map(async (entrypoint)=>{
|
|
129
130
|
const { entryName } = entrypoint;
|
|
130
131
|
const serverLoadersFile = (0, utils_js_namespaceObject.getServerCombinedModuleFile)(internalDirectory, entryName);
|
|
@@ -132,6 +133,7 @@ async function applySSRLoaderEntry(chain, optinos, isServer) {
|
|
|
132
133
|
await utils_namespaceObject.fs.access(serverLoadersFile, utils_namespaceObject.fs.constants.F_OK);
|
|
133
134
|
chain.entry(`${entryName}-server-loaders`).add(serverLoadersFile);
|
|
134
135
|
} catch (err) {}
|
|
136
|
+
else if (isRsc) chain.entry(`${entryName}-server-loaders`).add("data:text/javascript,export%20{};");
|
|
135
137
|
}));
|
|
136
138
|
}
|
|
137
139
|
function applySSRDataLoader(chain, options) {
|
|
@@ -94,9 +94,10 @@ function applyFilterEntriesBySSRConfig({ isProd, chain, appNormalizedConfig }) {
|
|
|
94
94
|
});
|
|
95
95
|
}
|
|
96
96
|
async function applySSRLoaderEntry(chain, optinos, isServer) {
|
|
97
|
-
const { appContext } = optinos;
|
|
97
|
+
const { appContext, normalizedConfig } = optinos;
|
|
98
98
|
const { internalDirectory } = appContext;
|
|
99
99
|
const { entrypoints } = appContext;
|
|
100
|
+
const isRsc = isUseRsc(normalizedConfig);
|
|
100
101
|
await Promise.all(entrypoints.map(async (entrypoint)=>{
|
|
101
102
|
const { entryName } = entrypoint;
|
|
102
103
|
const serverLoadersFile = getServerCombinedModuleFile(internalDirectory, entryName);
|
|
@@ -104,6 +105,7 @@ async function applySSRLoaderEntry(chain, optinos, isServer) {
|
|
|
104
105
|
await fs.access(serverLoadersFile, fs.constants.F_OK);
|
|
105
106
|
chain.entry(`${entryName}-server-loaders`).add(serverLoadersFile);
|
|
106
107
|
} catch (err) {}
|
|
108
|
+
else if (isRsc) chain.entry(`${entryName}-server-loaders`).add("data:text/javascript,export%20{};");
|
|
107
109
|
}));
|
|
108
110
|
}
|
|
109
111
|
function applySSRDataLoader(chain, options) {
|
|
@@ -96,9 +96,10 @@ function applyFilterEntriesBySSRConfig({ isProd, chain, appNormalizedConfig }) {
|
|
|
96
96
|
});
|
|
97
97
|
}
|
|
98
98
|
async function applySSRLoaderEntry(chain, optinos, isServer) {
|
|
99
|
-
const { appContext } = optinos;
|
|
99
|
+
const { appContext, normalizedConfig } = optinos;
|
|
100
100
|
const { internalDirectory } = appContext;
|
|
101
101
|
const { entrypoints } = appContext;
|
|
102
|
+
const isRsc = isUseRsc(normalizedConfig);
|
|
102
103
|
await Promise.all(entrypoints.map(async (entrypoint)=>{
|
|
103
104
|
const { entryName } = entrypoint;
|
|
104
105
|
const serverLoadersFile = getServerCombinedModuleFile(internalDirectory, entryName);
|
|
@@ -106,6 +107,7 @@ async function applySSRLoaderEntry(chain, optinos, isServer) {
|
|
|
106
107
|
await fs.access(serverLoadersFile, fs.constants.F_OK);
|
|
107
108
|
chain.entry(`${entryName}-server-loaders`).add(serverLoadersFile);
|
|
108
109
|
} catch (err) {}
|
|
110
|
+
else if (isRsc) chain.entry(`${entryName}-server-loaders`).add("data:text/javascript,export%20{};");
|
|
109
111
|
}));
|
|
110
112
|
}
|
|
111
113
|
function applySSRDataLoader(chain, options) {
|
package/package.json
CHANGED
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
"modern",
|
|
18
18
|
"modern.js"
|
|
19
19
|
],
|
|
20
|
-
"version": "3.2.0-ultramodern.
|
|
20
|
+
"version": "3.2.0-ultramodern.13",
|
|
21
21
|
"types": "./dist/types/index.d.ts",
|
|
22
22
|
"main": "./dist/cjs/index.js",
|
|
23
23
|
"exports": {
|
|
@@ -98,16 +98,16 @@
|
|
|
98
98
|
"ndepe": "^0.1.13",
|
|
99
99
|
"pkg-types": "^2.3.1",
|
|
100
100
|
"std-env": "4.1.0",
|
|
101
|
-
"@modern-js/
|
|
102
|
-
"@modern-js/
|
|
103
|
-
"@modern-js/plugin
|
|
104
|
-
"@modern-js/
|
|
105
|
-
"@modern-js/
|
|
106
|
-
"@modern-js/server
|
|
107
|
-
"@modern-js/server-
|
|
108
|
-
"@modern-js/utils": "npm:@bleedingdev/modern-js-utils@3.2.0-ultramodern.
|
|
109
|
-
"@modern-js/
|
|
110
|
-
"@modern-js/
|
|
101
|
+
"@modern-js/i18n-utils": "npm:@bleedingdev/modern-js-i18n-utils@3.2.0-ultramodern.13",
|
|
102
|
+
"@modern-js/builder": "npm:@bleedingdev/modern-js-builder@3.2.0-ultramodern.13",
|
|
103
|
+
"@modern-js/plugin": "npm:@bleedingdev/modern-js-plugin@3.2.0-ultramodern.13",
|
|
104
|
+
"@modern-js/plugin-data-loader": "npm:@bleedingdev/modern-js-plugin-data-loader@3.2.0-ultramodern.13",
|
|
105
|
+
"@modern-js/prod-server": "npm:@bleedingdev/modern-js-prod-server@3.2.0-ultramodern.13",
|
|
106
|
+
"@modern-js/server": "npm:@bleedingdev/modern-js-server@3.2.0-ultramodern.13",
|
|
107
|
+
"@modern-js/server-core": "npm:@bleedingdev/modern-js-server-core@3.2.0-ultramodern.13",
|
|
108
|
+
"@modern-js/server-utils": "npm:@bleedingdev/modern-js-server-utils@3.2.0-ultramodern.13",
|
|
109
|
+
"@modern-js/utils": "npm:@bleedingdev/modern-js-utils@3.2.0-ultramodern.13",
|
|
110
|
+
"@modern-js/types": "npm:@bleedingdev/modern-js-types@3.2.0-ultramodern.13"
|
|
111
111
|
},
|
|
112
112
|
"devDependencies": {
|
|
113
113
|
"@rslib/core": "0.21.5",
|