Skip to content

File-based routing does not support prefixed dynamic segments #1972

@tonyfromundefined

Description

@tonyfromundefined

Hi team, thanks for building Waku.

I’m seeing a limitation in file-based routing: dynamic segments appear to work only when the segment is exactly bracketed (e.g. [param]), but not when a static prefix is attached (e.g. prefix[param]).

Expected behavior

File-based routing should allow dynamic segments with static prefixes, so URLs like:

  • /@value
  • /u-value
  • /org-value

can be represented directly in route segment naming.

Actual behavior

Prefixed dynamic segment patterns are not recognized correctly.
Only plain dynamic segments (without prefix) seem to be supported.

Why this matters

Many URL conventions rely on prefixed identifiers (for example handle-like URLs). Without prefix support, developers must change URL structure or add extra routing workarounds.

Request

Could Waku support static-prefix + dynamic-segment patterns in file-based routing, or provide an official recommended pattern for this use case?

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