N
Nuxt9mo ago
LATEEK

Your feedback, what should I use ? Fork || Layer || Module ?

Given that I need to create multiple Nuxt website (like between 20 or 40), all based on the same set of components / composable / plugins / etc, but must allow overidde. ie: I wan't to ship a ready to use selling page, but still be able to use a specific component / page if I want. What would you advice ? - Create a classic nuxt app with all my core stuff (components / composable / plugins / ...), THEN fork the repo for every new projet. - Create a nuxt Layer with all my core stuff. - Create a nuxt module with all my core stuff. I'm not sure which one would be appropriate. I hope some experienced nuxt user could help me on this dilemma.
4 Replies
Single
Single9mo ago
I would usually go for use Nuxt Layers, but as you want to overwrite/customize each of them individually, i would probably go for a fork. This way, you can still bring in updates from the master origin.
LATEEK
LATEEKOP9mo ago
thanks for you feedback !
Muhammad Mahmoud
I have a similar case as I'm working on multiple projects for my company and I've chosen layers and It's been great. You can also get updates automatically from layers easier than forks even. You can publish a layer as a package and use versioning so that you don't pull a breaking change by accident for example. With forks you only get the basic boilerplate and it'll be easy to have minor differences in base components between forks that may cause unwanted errors
oemer
oemer9mo ago
My rule of thumb: - Use the reusable source as long as you can (In this case: Nuxt Layers) - Once you see you have to do too many if-else conditions at too many places to satisfy all requirements, copy-paste it (In this case: Fork)
Want results from more Discord servers?
Add your server