Skip to content

SSR Cannot Handle [slug].html.astro #15930

@rktyt

Description

@rktyt

Astro Info

Astro                    v6.0.4
Vite                     v7.3.1
Node                     v22.22.0
System                   Linux (x64)
Package Manager          npm
Output                   server
Adapter                  none
Integrations             none

If this issue only occurs in one browser, which browser is a problem?

No response

Describe the Bug

With the following file:

pages/[slug].html.astro

---
const { slug } = Astro.params;
---

When accessing dummy.html, the following error occurs:

TypeError: Missing parameter: slug


If the file is changed to pages/[slug].astro:

---
const { slug } = Astro.params;
---

Accessing dummy.html becomes possible, but the value assigned to slug does not include .html.

What's the expected result?

No error should occur, and it should behave the same as in v5.18.1.

Link to Minimal Reproducible Example

https://stackblitz.com/edit/github-cb9obzze-viaptect?file=src%2Fpages%2Findex.astro

Participation

  • I am willing to submit a pull request for this issue.

Metadata

Metadata

Assignees

Labels

- P4: importantViolate documented behavior or significantly impacts performance (priority)pkg: astroRelated to the core `astro` package (scope)

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions