Skip to content

Allow special characters in path and filenames #4624

@Kingdutch

Description

@Kingdutch

Background

Next.js is the defacto solution for creating dynamic React.js websites. It allows to easily create applications and fine-tune where rendering happens (client or server). ReScript would be a great match here to provide typesafety in these solutions. Some great work has been done by https://github.com/mrmurphy/reason-nextjs already but a large painpoint remains.

Next.js uses special characters such as [id] and [...slug] in the pathnames and filenames of files in the pages/ directory. These are variable placeholders that are used for route arguments. Documentation for this can be found here: https://nextjs.org/docs/routing/dynamic-routes

Requested change

By allowing special characters (specifically those used by Next.js routing) in path and filenames, integration with the Next.js framework would be greatly simplified. This could be put behind configuration that limits it to a specific folder that may not be used as module imports (to work around the module naming limitation).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions