Issue:
All anchor elements that match page routes are forced into client-side navigation by RSF. This causes unexpected behavior such as the target="_blank" attribute having no effect.
Solution:
Updated useSimpleNavigation to allow users ability to opt out of client-side navigation behavior by setting the data-native attribute on anchor elements. This allows the anchor element to behave as it would natively.
Issue:
In development listRoutes returns missing routes in development when using alternative file extensions (.jsx, .ts, .tsx)
Solution:
Updated glob pattern used by createDevelopmentPagesManifest to include files with .jsx, .ts, .tsx extensions.
Issue:
In development listRoutes returns incorrectly parsed as values when using new Next.js route patterns. e.g. listRoutes returns as: "/[" when given the route /pages/[...catchAll].js
Solution:
Updated createDevelopmentPagesManifest to better parse the as value.
This PR highlights certain issues with using RSF in development. I left a few comments where issues remain but I currently don't have the resources to fully fix.
Issue: All anchor elements that match page routes are forced into client-side navigation by RSF. This causes unexpected behavior such as the
target="_blank"
attribute having no effect.Solution: Updated
useSimpleNavigation
to allow users ability to opt out of client-side navigation behavior by setting thedata-native
attribute on anchor elements. This allows the anchor element to behave as it would natively.Issue: In development
listRoutes
returns missing routes in development when using alternative file extensions (.jsx
,.ts
,.tsx
)Solution: Updated glob pattern used by
createDevelopmentPagesManifest
to include files with.jsx
,.ts
,.tsx
extensions.Issue: In development
listRoutes
returns incorrectly parsedas
values when using new Next.js route patterns. e.g.listRoutes
returnsas: "/["
when given the route/pages/[...catchAll].js
Solution: Updated
createDevelopmentPagesManifest
to better parse theas
value.