Skip to content

Commit

Permalink
fix: allow dynamic routes with missing fallback in hash mode (#13213)
Browse files Browse the repository at this point in the history
  • Loading branch information
Rich-Harris authored Dec 21, 2024
1 parent 141b0f9 commit fdae48f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/four-llamas-join.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@sveltejs/adapter-static': patch
---

fix: allow dynamic routes with missing fallback in hash mode
2 changes: 1 addition & 1 deletion packages/adapter-static/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ export default function (options) {
name: '@sveltejs/adapter-static',

async adapt(builder) {
if (!options?.fallback) {
if (!options?.fallback && builder.config.kit.router.type !== 'hash') {
const dynamic_routes = builder.routes.filter((route) => route.prerender !== true);
if (dynamic_routes.length > 0 && options?.strict !== false) {
const prefix = path.relative('.', builder.config.kit.files.routes);
Expand Down

0 comments on commit fdae48f

Please sign in to comment.