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

Change the way that folder-contained routes are discovered / resolved #957

Open
@GGAlanSmithee

Description

@GGAlanSmithee

Feature request

Change the way that folder-contained routes are discovered / resolved

Describe the solution you'd like

Instead of having sapper look for routes/{route}/index.svelte, have it look for routes/{route}/{route}.svelte (or make both patterns available)

Describe alternatives you've considered

Non really.

How important is this feature to you?

It's not super important, but as a project grows having a bunch of index.svelte is less than ideal from a devx perspective.

Additional context

I understand that the current implementation is according the default NodeJS file resolving algorithm, but having worked at large nodejs projects, it does not scale with project size.

This is a breaking change, since it would dissalow {url}/{route}/{route} but IMO that's a worthwhile tradeoff.

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