Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Proposal for a Webpack Plugin to Support Next.js typedRoute #495

Closed
wants to merge 1 commit into from

Conversation

HHongSeungWoo
Copy link
Contributor

@HHongSeungWoo HHongSeungWoo commented Sep 1, 2023

Related issue: #396

How about using a webpack plugin to support Next.js typedRoute? this PR includes test code for the proposal.

@vercel
Copy link

vercel bot commented Sep 1, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
next-intl-example-next-13 ❌ Failed (Inspect) Sep 1, 2023 9:55am

@vercel
Copy link

vercel bot commented Sep 1, 2023

@HHongSeungWoo is attempting to deploy a commit to the next-intl Team on Vercel.

A member of the Team first needs to authorize it.

* The path or URL to navigate to. This is the only required prop. It can also be an object.
* @see https://nextjs.org/docs/api-reference/next/link
*/
href: __next_route_internal_types__.RouteImpl<RouteInferType> | UrlObject;
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh wow, thanks for proposing this!

I haven't experimented with typed routes from Next.js yet, but based on the docs, shouldn't this be achievable by composing Route from next? See the docs.

Btw. we do already have a webpack plugin in #149 that creates an alias for the RSC config. If a webpack plugin is the only way to achieve this, we could integrate with that.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for the review.
I appreciate your feedback. It seems that I missed some important details in the documentation.
At this point, it appears that using Route directly is a much better approach.
I look forward to contributing again once typedRoute stabilizes. Thank you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants