rsnext/contributing/core/building.md
Balázs Orbán 3ff21ed178
refactor: split up CONTRIBUTING.md (#40515)
Continues #39778

Closes #40499

## Bug

- [ ] Related issues linked using `fixes #number`
- [ ] Integration tests added
- [ ] Errors have helpful link attached, see `contributing.md`

## Feature

- [ ] Implements an existing feature request or RFC. Make sure the
feature request has been accepted for implementation before opening a
PR.
- [ ] Related issues linked using `fixes #number`
- [ ] Integration tests added
- [ ] Documentation added
- [ ] Telemetry added. In case of a feature if it's used or not.
- [ ] Errors have helpful link attached, see `contributing.md`

## Documentation / Examples

- [ ] Make sure the linting passes by running `pnpm lint`
- [ ] The examples guidelines are followed from [our contributing
doc](https://github.com/vercel/next.js/blob/canary/contributing.md#adding-examples)

Co-authored-by: Tim Neutkens <tim@timneutkens.nl>
Co-authored-by: JJ Kasper <jj@jjsweb.site>
2022-09-16 14:54:58 -07:00

871 B

Building

You can build Next.js, including all type definitions and packages, with:

pnpm build

By default, the latest canary of the next-swc binaries will be installed and used. If you are actively working on Rust code or you need to test out the most recent Rust code that hasn't been published as a canary yet you can install Rust and run pnpm --filter=@next/swc build-native.

If you want to test out the wasm build locally, you will need to install wasm-pack. Run pnpm --filter=@next/swc build-wasm --target <wasm_target> to build and node ./scripts/setup-wasm.mjs to copy it into your node_modules. Run next with NODE_OPTIONS='--no-addons' to force it to use the wasm binary.

If you need to clean the project for any reason, use pnpm clean.