Skip to content

Commit

Permalink
Server preview from root
Browse files Browse the repository at this point in the history
  • Loading branch information
jhildenbiddle committed Dec 21, 2023
1 parent 89c6627 commit 9b7ee0c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 6 deletions.
2 changes: 1 addition & 1 deletion middleware.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { rewriteRules } from './preview.config.cjs';
// Exports
// =============================================================================
export const config = {
matcher: ['/preview/(index.html)?'],
matcher: ['/(index.html)?'],
};

// Serve virtual /preview/index.html
Expand Down
6 changes: 1 addition & 5 deletions vercel.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,7 @@
]
}
],
"redirects": [
{ "source": "/", "destination": "/preview/" }
],
"rewrites": [
{ "source": "/preview/CHANGELOG.md", "destination": "/CHANGELOG.md" },
{ "source": "/preview/:path*", "destination": "/docs/:path*" }
{ "source": "/:path*", "destination": "/docs/:path*" }
]
}

0 comments on commit 9b7ee0c

Please sign in to comment.