Framework
Once you've read the general contribution guide, here are some specific points to make about contributions to the nuxt/nuxt repository.
Monorepo Guide
packages/kit: Toolkit for authoring Nuxt modules, published as@nuxt/kit.packages/nitro-server: The default server builder for Nuxt, using Nitro, published as@nuxt/nitro-server.packages/nuxt: The core of Nuxt, published asnuxt.packages/schema: Cross-version Nuxt typedefs and defaults, published as@nuxt/schema.packages/ui-templates: Source of the built-in HTML templates for Nuxt (error pages, loading screen, welcome page).packages/rsbuild: The Rsbuild bundler for Nuxt, published as@nuxt/rsbuild-builder.packages/rspack: The deprecated Rspack bundler for Nuxt (superseded by@nuxt/rsbuild-builder), published as@nuxt/rspack-builder.packages/vite: The Vite bundler for Nuxt, published as@nuxt/vite-builder.packages/vite-server: The experimental pure Vite server builder for Nuxt, published as@nuxt/vite-server.packages/webpack: The webpack bundler for Nuxt, published as@nuxt/webpack-builder.
The architecture overview explains how these packages fit together and which kind of test a change needs.
Setup
To contribute to Nuxt, you need to set up a local environment.
- Fork the
nuxt/nuxtrepository to your own GitHub account and then clone it to your local device. - Ensure using the latest Node.js
Enable Corepack to have
pnpmandyarnTerminalcorepack enableRun
pnpm install --frozen-lockfileto Install the dependencies with pnpm:Terminalpnpm install --frozen-lockfileIf you are adding a dependency, please usepnpm add.
Thepnpm-lock.yamlfile is the source of truth for all Nuxt dependencies.Activate the passive development system
Terminalpnpm dev:prepareCheck out a branch where you can work and commit your changes:
Terminalgit checkout -b my-new-branch
Then, test your changes against the playground and test your changes before submitting a pull request.
Playground
While working on a pull request, you will likely want to check if your changes are working correctly.
You can modify the example app in playground/, and run:
pnpm devTesting
Every new feature and bug fix should have a corresponding test, at the cheapest layer that covers it (a unit test if possible). The tests section of the architecture overview describes each layer and when to use it.
Before creating a PR or marking it as ready-to-review, ensure that all tests pass by running:
pnpm testLinting
You might have noticed already that we use ESLint to enforce a coding standard.
Before committing your changes, to verify that the code style is correct, run:
pnpm lintpnpm lint --fix to fix most of the style changes. If there are still errors left, you must correct them manually.
Documentation
If you are adding a new feature or refactoring or changing the behavior of Nuxt in any other manner, you'll likely want to document the changes. Please include any changes to the docs in the same PR. You don't have to write documentation up on the first commit (but please do so as soon as your pull request is mature enough).
Final Checklist
When submitting your PR, there is a simple template that you have to fill out. Please tick all appropriate "answers" in the checklists.
Documentation Guide
If you spot an area where we can improve documentation or error messages, please do open a PR - even if it's just to fix a typo!
Quick Edits
If you spot a typo or want to rephrase a sentence, you can click on the Edit this page link located on the right aside in the Community section.
Make the change directly in the GitHub interface and open a Pull Request.
Longer Edits
The documentation content is inside the docs/ directory of the nuxt/nuxt repository and written in markdown.
Linting Docs
Documentation is linted using MarkdownLint and case police to keep the documentation cohesive.
pnpm lint:docspnpm lint:docs:fix to highlight and resolve any lint issues.Open a PR
Please make sure your PR title adheres to the conventional commits guidelines.
docs: update the section about the nuxt.config.ts file