@reckona/mreact-router 0.0.183 → 0.0.184
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/build.d.ts.map +1 -1
- package/dist/build.js +8 -3
- package/dist/build.js.map +1 -1
- package/dist/bundle-pipeline.d.ts.map +1 -1
- package/dist/bundle-pipeline.js +9 -0
- package/dist/bundle-pipeline.js.map +1 -1
- package/dist/client.d.ts +1 -0
- package/dist/client.d.ts.map +1 -1
- package/dist/client.js +193 -2
- package/dist/client.js.map +1 -1
- package/dist/module-runner.d.ts.map +1 -1
- package/dist/module-runner.js +132 -1
- package/dist/module-runner.js.map +1 -1
- package/dist/render.d.ts.map +1 -1
- package/dist/render.js +9 -5
- package/dist/render.js.map +1 -1
- package/dist/vite.d.ts.map +1 -1
- package/dist/vite.js +4 -0
- package/dist/vite.js.map +1 -1
- package/package.json +11 -11
- package/src/build.ts +8 -5
- package/src/bundle-pipeline.ts +9 -0
- package/src/client.ts +195 -2
- package/src/module-runner.ts +185 -1
- package/src/render.ts +11 -7
- package/src/vite.ts +4 -0
package/dist/render.js
CHANGED
|
@@ -755,7 +755,7 @@ async function renderAppRequestInternal(options) {
|
|
|
755
755
|
assetBaseUrl: options.assetBaseUrl,
|
|
756
756
|
currentStyleSheets: clientStyleSheets,
|
|
757
757
|
currentScript: clientRoute ? clientScript : undefined,
|
|
758
|
-
currentNavigationScript:
|
|
758
|
+
currentNavigationScript: navigationScript,
|
|
759
759
|
routeScripts: options.clientScripts,
|
|
760
760
|
})}${html}`, preparedActions.htmlReplacements), {
|
|
761
761
|
headers: responseHeadersForMetadata(metadata, options.request, {
|
|
@@ -999,7 +999,7 @@ async function renderAppRequestInternal(options) {
|
|
|
999
999
|
assetBaseUrl: options.assetBaseUrl,
|
|
1000
1000
|
currentStyleSheets: clientStyleSheets,
|
|
1001
1001
|
currentScript: clientRoute ? clientScript : undefined,
|
|
1002
|
-
currentNavigationScript:
|
|
1002
|
+
currentNavigationScript: navigationScript,
|
|
1003
1003
|
routeScripts: options.clientScripts,
|
|
1004
1004
|
})}${html}`, preparedActions.htmlReplacements), {
|
|
1005
1005
|
headers: responseHeadersForMetadata(metadata, options.request),
|
|
@@ -1150,9 +1150,13 @@ function hasUrlScheme(value) {
|
|
|
1150
1150
|
return true;
|
|
1151
1151
|
}
|
|
1152
1152
|
function navigationRuntimeScriptTag(script, assetBaseUrl) {
|
|
1153
|
-
|
|
1154
|
-
|
|
1155
|
-
|
|
1153
|
+
if (script === undefined) {
|
|
1154
|
+
return "";
|
|
1155
|
+
}
|
|
1156
|
+
const json = JSON.stringify({
|
|
1157
|
+
script: assetPath(script, assetBaseUrl ?? "/_mreact/client/"),
|
|
1158
|
+
}).replaceAll("<", "\\u003c");
|
|
1159
|
+
return `<script type="application/json" id="mreact-navigation-runtime">${json}</script>`;
|
|
1156
1160
|
}
|
|
1157
1161
|
function routePrefetchManifestScript(routeScripts, assetBaseUrl) {
|
|
1158
1162
|
if (routeScripts === undefined || routeScripts.size === 0) {
|