NuxtN
Nuxt9mo ago
RicharDVD

Explicit import from local Layer

Hi! I am migrating a Nuxt app to a layered architecture because we want to create a second application with a lot of the same core code, just some pages that are different. I migrated the folder structure to the following:

  • pnpm-workspace.yaml
  • package.json
  • packages
    • autoatlas (website1)
      • ***
      • nuxt.config.ts
      • package.json
    • leaseboer (website2)
      • ***
      • nuxt.config.ts
      • package.json
    • base (shared code)
      • ***
      • nuxt.config.ts
      • package.json
For now I moved the code of our current website into base, but only moved the pages in the autoatlas layer. The autoatlas layer and leasboer layer both extend the base layer.

The autoatlas layer runs but I have some explicit imports that now do not resolve anymore. I for example need to explicitly import a store from autoatlas that is located in the base layer.

So my basic question is, how do I explicitly import something from another layer?
Was this page helpful?