Skip to content

Commit fdae48f

Browse files
authored
fix: allow dynamic routes with missing fallback in hash mode (#13213)
1 parent 141b0f9 commit fdae48f

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

.changeset/four-llamas-join.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@sveltejs/adapter-static': patch
3+
---
4+
5+
fix: allow dynamic routes with missing fallback in hash mode

packages/adapter-static/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ export default function (options) {
77
name: '@sveltejs/adapter-static',
88

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

0 commit comments

Comments
 (0)