Skip to content

.dev.ts suffix for dev-only routes  #1849

Closed

Description

@TheAlexLichter

Describe the feature

Hey all 👋🏻

An equivalent of e.g. Nuxt's <DevOnly> component for Nitro would be interesting and could be the .dev.ts suffix. All routes having a .dev suffix in the file would only be loaded during development and would not be present in production.

Benefits would be automatic removal on production and being able to define e.g. debug endpoints in your dev environment 🙌

Related: nuxt/nuxt#18730

Additional information

  • Would you be willing to help implement this feature?

Activity

  1. added
    pending triage
    enhancement
    and removed
    pending triage
    on Oct 23, 2023
  2. pi0 commented on Oct 23, 2023

    @pi0
    Member

    PR is welcome to implement this feature. We might also introduce a new dev flag to the event handler object type and allow programmatic registration of them.

  3. TheAlexLichter commented on Apr 24, 2024

    @TheAlexLichter
    MemberAuthor

    Resolved via #2272 (nitro nightly at the moment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

enhancement

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions