let's say we have website A
, website B
, website C
. They will all be on their own domain (mypage-a.com
, mypage-b.com
, mypage-c.com
). The framework used is nuxt.js.
However, all 3 websites should have access to the same /components
dir. Therefore, it would make sense to be able to have the same project for all 3 websites.
How could we set this up best? It seems like we have to temper a lot with the default settings. Important things to mention:
<a>
tags, no <nuxt-link>
/components
dir should be available to all 3 subprojectsWe solved it like this:
1 repository for all projects together
In a directory projects
, we defined all the subprojects we need, all with their own nuxt.config.js
Shared components are in the root directory
Other shared code (nuxt.config.base.js
, css etc) goes into the root directory, end gets extended by the subprojects if needed
|-components
|-projects
|-A
|-components
|-pages
|-nuxt.config.js
|-...
|-B
|-...
|-nuxt.config.base.js
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With