netlify / netlify/framework-adapters

Nuxt module: allow customisable `projectRoot` for Layers

Open
#11 1 comment 1 reaction 1 assignee View on GitHub

@serhalp is already working on this.

Since Aug 19, 2025.

Dominant language
TypeScript
Stars
1
Forks
3
Avg merge
1d 7h
Merged PRs (30d)
9

Description

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.

https://github.com/netlify/primitives/blob/26411689aab3b6463620cf46a7f9b79e503ae0bf/packages/nuxt-module/src/module.ts#L54

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

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.