Skip to content

Nuxt module: allow customisable projectRoot for Layers #412

@abovedave

Description

@abovedave

We make use of Layers to create a monorepo setup for multiple sites.

The value of nuxt.options.rootDir is reporting the sub-site folder, but our .netlify folder is at the project root, so it would be useful to pass the value into the @netlify/dev config to this location in "shared" layer nuxt.config.ts i.e.,

netlify: {
  projectRoot: './'
}

I believe it's a quick change, I can open a PR if required.

projectRoot: nuxt.options.rootDir,

const module = defineNuxtModule({
-  projectRoot: nuxt.options.rootDir,
+  projectRoot: options.projectRoot || nuxt.options.rootDir,
})

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions