Open mohitxskull opened 11 hours ago
Hey! thanks for the explanations, that’s really cool
I’m not very familiar with Next.JS, so I was wondering if you’d be interested in opening a PR? Ideally with the following things:
./examples/nextjs
folder in the repo with a minimal example of Tuyau with Adonis and NextThat would be amazing to have
Thanks again for the explanation
Sure, I'd be happy to do that :)
AdonisJS is a beautiful framework, I use it a lot, and I love the work of you people as I regularly dig inside the codebase of AdonisJS and the packages maintained officially by the core team and it helps me learn a lot of things.
Thank you for your work.
As for the PR
index.ts
in ./adonisjs
folder and referencing all the required types there rather than doing it in every project you import the api?Are you open to the idea of having a index.ts in ./adonisjs folder and referencing all the required types there rather than doing it in every project you import the api?
What you mean by that? You're including /// references
in there ? If so, yeah, absolutely
Like this, So we just need to simple import the routes on the client side and don't need to do any extra work.
When importing Tuyau schemas into a Next.js project, I encountered errors related to missing types and disallowed decorators. To resolve this, I added the following to my Next.js
tsconfig.json
:And as i am directly importing
.ts
files i need to add this innext.config.mjs
Additionally, I created a
./client/index.ts
file in my backend project to export the necessary schemas:I believe this approach could be documented in the Tuyau documentation to help other developers facing similar issues.