Skip to content

Commit

Permalink
fix: asset routing
Browse files Browse the repository at this point in the history
  • Loading branch information
gabrielmpinto committed Nov 5, 2024
1 parent 684eec0 commit 7efb788
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ export function generateGlobalJs(): string {
let assetPath = pathname;
if (!/\\.[^.]+$/.test(assetPath)) {
const noExt = pathname.replace(/.html$/, '');
assetPath = \`\${noExt.replace(/^\\/$/, '/index')}.html\`;
assetPath = \`\${noExt.replace(/\\/$/, '/index')}.html\`;
}
const response = await fetch(
Expand Down
2 changes: 1 addition & 1 deletion packages/next-on-fleek/templates/_worker.js/utils/fetch.ts
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ globalThis.ASSETS = {
let assetPath = pathname;
if (/\.[^.]+$/.test(assetPath)) {
const noExt = pathname.replace(/\.html$/, '');
assetPath = `${noExt.replace(/^\/$/, '/index')}.html`;
assetPath = `${noExt.replace(/\/$/, '/index')}.html`;
}

const response = await fetch(
Expand Down

0 comments on commit 7efb788

Please sign in to comment.