mnfst 0.5.48 → 0.5.50

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.
@@ -131,7 +131,7 @@ function initializeLocalizationPlugin() {
131
131
 
132
132
  if (hasLanguageInUrl) pathParts[0] = newLang;
133
133
  else pathParts.unshift(newLang);
134
- currentUrl.pathname = '/' + pathParts.join('/');
134
+ currentUrl.pathname = '/' + pathParts.join('/') + '/';
135
135
  return currentUrl.toString();
136
136
  }
137
137
 
@@ -479,7 +479,13 @@ function installMpaStickyLocaleLinks() {
479
479
  event.preventDefault();
480
480
  event.stopPropagation();
481
481
  event.stopImmediatePropagation();
482
- url.pathname = adjusted;
482
+ // For prerendered MPA builds, directory paths must have a trailing slash so that the
483
+ // static file host (e.g. Appwrite) resolves them to the correct index.html rather than
484
+ // falling back to the root index.html.
485
+ const hasFileExt = /\.[a-zA-Z0-9]+$/.test(adjusted);
486
+ url.pathname = (adjusted !== '/' && !hasFileExt && !adjusted.endsWith('/'))
487
+ ? adjusted + '/'
488
+ : adjusted;
483
489
 
484
490
  const dest = url.toString();
485
491
  if (link.target === '_blank') {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mnfst",
3
- "version": "0.5.48",
3
+ "version": "0.5.50",
4
4
  "private": false,
5
5
  "workspaces": [
6
6
  "templates/starter",