Skip to content

feat: handle route prefix for Next and Nuxt #314

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

Closed
wants to merge 5 commits into from

Conversation

Shywim
Copy link
Contributor

@Shywim Shywim commented Nov 25, 2021

Q A
Branch? main
Tickets #310 #284
License MIT
Doc PR

This adds support for route_prefix for Next and Nuxt. Directories for each segment are created for the pages, e.g. foo/bar/entity will create pages/foo/bar/entity/index.js and so on for every template.

This fixes #284 and #310

This also comes with a fix for the Next template which didn't work out the box due to the API response being parsed twice (res.json() followed by res.text()) in dataAccess.ts

@alanpoulain
Copy link
Member

I don't think this fix is good: a prefix for an API resource should not be reflected on the client part.
We should just make sure the generated code works with a prefix in the API part.

@alanpoulain
Copy link
Member

Replaced by #336.
Thanks @Shywim!

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.

Next.js: SyntaxError: Unexpected token, expected ";" (8:7)
2 participants