Is there a way to make a project function independently while still being accessible through layers and able to run smoothly? The current project structure is as follows:
📦root
┣ 📂commons
┗ 📂project1
┗ 📂project2
In both project1
and project2
, I am utilizing the commons
by including it in their respective nuxt.config.js
:
extends: ["../commons"]
Within my project1 nuxt.config.js
, I am using both commons
and project2
because I need to navigate to certain pages in project2
from project1
:
extends: ["../commons", "../project2"],
The goal is for project2
to be able to function independently and also seamlessly integrate with project1
. While running project2
on its own works fine, transitioning from project1
to project2
exposes issues such as incorrect imports for values like locales
and malfunctioning component imports.
Upon investigation, it seems that when accessed from project1
, the components in project2
are trying to reference components in project1
instead, resulting in some components not loading correctly.
How can this particular scenario be addressed to ensure that project2
functions autonomously as well as when accessed from project1
?