Skip to content
This repository was archived by the owner on Jan 11, 2023. It is now read-only.
This repository was archived by the owner on Jan 11, 2023. It is now read-only.

sapper export --entry ignores file extensions #871

Open
@WaltzingPenguin

Description

@WaltzingPenguin

Describe the bug
sapper --export "/file.html" does not produce the expected result. I would expect it to navigate to the path "/file.html", triggering the code in file.html.svelte, and output this to "/file.html". Instead, it appears to navigate to "/file/", gets a 404, and tries to write out to "/file/index.html".

Behaviour on the dev server is as I would expect. "/file.html" returns the page I wrote, "/file/" returns a 404.

Logs

PS C:\www> npx sapper export --entry "/file.html" --build=false 
> Crawling http://localhost:3000/file/
   1.98 kB   (404) file/index.html
   1.87 kB   service-worker-index.html

> Finished in 885ms. Type npx serve __sapper__/export to run the app.

To Reproduce
Simply running npx sapper export --entry "/file.html" on any install does demonstrate the issue, since it starts the crawl at the wrong spot and outputs the wrong file.

Information about your Sapper Installation:

  • Your operating system: Windows 10

  • Your hosting environment: Local

  • Sapper version: 0.27.8

  • Svelte version: 3.9.1

Severity
An irritation for me. I was planning to use this to output 404.html, 500.html, etc for static hosting purposes. This makes it more difficult to output files not named index.html at the root level.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions