farm-fe / farm

Extremely fast Vite-compatible web build tool written in Rust
https://farmfe.org
MIT License
4.73k stars 157 forks source link

[Feature Request]: Create a Nextjs example #1617

Open spikecodes opened 1 month ago

spikecodes commented 1 month ago

What problem does this feature solve?

NextJS has a variety of routing conventions that differ from React so farm-react didn't work with my NextJS project.

What does the proposed API look like?

It would be great to have a NextJS example and maybe mention it in the docs to help guide using Farm with Next.

ErKeLost commented 1 month ago

farm should not be directly migrated from the existing next project at present, because the architecture between the two is different, whether it is from the plugin system or other configuration aspects, we should not be able to run the nextjs example at present

spikecodes commented 1 month ago

I see what you mean. So because Next includes a build process, Farm is more of an alternative to Next than a wrapper of Next's web framework (which is primarily React)?

ErKeLost commented 1 month ago

I haven't studied nextjs specifically. Should its underlying bundler be webpack and turbopack? We probably can’t support this upper-layer framework because many of its built-in things are not compatible with us. Maybe rspack can run the nestjs project. https://x.com/ScriptedAlchemy/status/1813020203825131809