Closed jrutila closed 3 months ago
You can test this feature like this:
playground/routes/
, for example abba.ts
that has this
export default eventHandler(async (event) => {
return "AbbA";
});
pnpm nitro build --dir playground
to first build the playgroundpnpm nitro render --dir playground --stdout abba
Is there possibility to get this forward? It will fall behind the main, again. Please let me know if something else is needed to get it merged.
Hi dear @jrutila thanks for your pull request and sorry for late review. I really appreciate it. โค๏ธ
I cannot accept it as-is for some reasons:
prerenderRoute()
) to be usable with other meta frameworks used in conjunction with nitroFor maintenance i am closing this PR (for now) let's keep tracking about the idea via #2466 i definitely love to work on this in the future and i guess same functionality can be implemented outside of nitro source tree to experiment with if you need it.
๐ Linked issue
2466
โ Type of change
๐ Description
Added a new option to
nitro.prerender
calledstdout
(default: false). When that option is set, the routes are generated to console output instead of written to files.Added a new command line tool called
render
that will render a single given route. It can have an option--stdout
and then it will output the route to console.๐ Checklist