#Any plugins for rspack or webpack support?

17 messages · Page 1 of 1 (latest)

brave grove
#

Hi - we are currently checking out this cool looking router ❤️
We are currently considering it for the PlatformPlatform project but we are on rspack - any official plugins or is the cli devtool the way to go?

Thank you 🙂

Kind regards Morten

dense mason
#

not yet

#

we were looking into unplugin, however the rspack support seems not to be that great (watching is not supported for example)

brave grove
#

I did create a simple filesystem router for generating react router as a rspack plugin - watch is possible: https://github.com/platformplatform/PlatformPlatform/blob/main/application/client-foundation/clientFilesystemRouter/rspack-plugin.ts

GitHub

🚀 Pre-alpha state. A platform designed for building enterprise-grade, multi-tenant products using Azure, .NET, React, TypeScript, Infrastructure as Code, etc. - platformplatform/PlatformPlatform

dense mason
#

so if you have experience you are more than welcome to contribute!

brave grove
#

Seems correct that unplugin doesn't have support for it yet - I can make a pull-request or we can wait until rspack / unplugin are ready, up to you 🙂

(just hoped that it already existed 😅 )

dense mason
#

if you can help out, would be great!

brave grove
#

super, I'll have a look - seems like unplugin could be a starting point

rough temple
#

Yup, this something I'll also be looking into next week.

Current plan is to introduce a @tanstack/router-plugin package with exports like @tanstack/router-plugin/vite, @tanstack/router-plugin/webpack, etc.
And have the @tanstack/router-vite-plugin simply re-export from @tanstack/router-plugin/vite.

Would have to make sure the Start stuff gets extracted out first though.

rough temple
#

Tracking this here: https://github.com/TanStack/router/issues/1756

I'm going to first make the migration and then work on getting webpack up and running since its currently fully supported by unplugin.

But once this goes through, the process of setting up the rspack export should be much more trivial.

GitHub

The intention here is to begin the migration to using unplugin so the router plugin can be made available for other bundlers like webpack, rspack, etc. in the future. Currently, the plugin package ...

Unified plugin system. Support Vite, Rollup, webpack, esbuild, and every frameworks on top of them.

brave grove
#

awesome, let me know if you need help testing etc. or if somethings blocking you etc. anything I can do to help out 🙂

rough temple
#

the router-plugin has been moved over to unplugin. going to work on getting another plugin out within the next couple days with a working example.

brave grove
#

Awesome work! 🙂

rough temple
#

looks like i'll be tackling rspack today... purely because they actually a barebones react-starter 😅

rough temple
#

The rspack plugin for route generation is out!
Still no support for the experimental code-splitting stuff, but that's for an older me to tackle.