@reckona/mreact-router 0.0.127 → 0.0.129
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/adapters/cloudflare.d.ts +3 -0
- package/dist/adapters/cloudflare.d.ts.map +1 -1
- package/dist/adapters/cloudflare.js +49 -8
- package/dist/adapters/cloudflare.js.map +1 -1
- package/dist/client.d.ts.map +1 -1
- package/dist/client.js +6 -1
- package/dist/client.js.map +1 -1
- package/package.json +11 -11
- package/src/adapters/cloudflare.ts +80 -11
- package/src/client.ts +18 -1
package/dist/client.js
CHANGED
|
@@ -706,7 +706,12 @@ function isStyleModuleSpecifier(source) {
|
|
|
706
706
|
}
|
|
707
707
|
const styleModuleExtensions = new Set([".css", ".less", ".sass", ".scss", ".styl", ".stylus"]);
|
|
708
708
|
function isClientBoundaryFallbackEligibleSource(source) {
|
|
709
|
-
|
|
709
|
+
const sourceWithoutComponentCallbackProps = source.replaceAll(/<[A-Z][A-Za-z0-9_$.]*(?:\s[\s\S]*?)?>/gu, (tag) => tag.replaceAll(/\s+on[A-Z][A-Za-z0-9_$]*\s*=\s*\{[^{}]*\}/gu, ""));
|
|
710
|
+
const sourceWithoutGuardedUndefinedCallbacks = sourceWithoutComponentCallbackProps
|
|
711
|
+
.replaceAll(/\bon[A-Z][A-Za-z0-9_$]*\s*=\s*\{\s*props\.[A-Za-z_$][\w$]*\s*===\s*undefined\s*\?\s*undefined\s*:/gu, "")
|
|
712
|
+
.replaceAll(/\bon[A-Z][A-Za-z0-9_$]*\s*=\s*\{\s*props\.[A-Za-z_$][\w$]*\s*\?\s*[^{}]*:\s*undefined\s*\}/gu, "");
|
|
713
|
+
return (!/\bon[A-Z][A-Za-z0-9_$]*\s*=/u.test(sourceWithoutGuardedUndefinedCallbacks) &&
|
|
714
|
+
!/\bglobalThis\b/u.test(source));
|
|
710
715
|
}
|
|
711
716
|
function renderedImportedExportNames(reference, componentRoots) {
|
|
712
717
|
if (reference.sideEffect) {
|