I'm having a site, let's say example.com which shares the layout and few components with subdomain blog.example.com so i want to create common nuxtJS project for this so that the routes and all things will be optimized by nuxtJS, i don't want to create 2 projects for this as there would be repetition of components, how can i achieve this result?
-
The way you are planning to host is important here. Are you planning on using something like Netlify for static-site generation or something like Heroku for server-side-rendering?Leopold Kristjansson– Leopold Kristjansson2020-08-18 08:48:58 +00:00Commented Aug 18, 2020 at 8:48
-
1actually I'm hosting on vercel with server-side rendering and I've already configured my domain for wild cards so whatever be the subdomain, it is going to load my sitekrypton– krypton2020-08-18 10:05:20 +00:00Commented Aug 18, 2020 at 10:05
Add a comment
|
1 Answer
I achieved the result by filtering the routes to remove and then removing the folder name the path and route name, with @nuxtjs/router module, and for simplicity I've created my own module to do the exact same with user friendly interface, have a look at k-domains npm module.
Here's the link to the article