29 lines
814 B
Markdown
29 lines
814 B
Markdown
# Rebuild your next project incrementally.
|
|
|
|
Create builds incrementally without stopping your server.
|
|
|
|
## Requirements
|
|
|
|
There are a few requirements to get this to work
|
|
|
|
### Update your `next-config.js` file
|
|
|
|
You need to update the distribution directory in your `next-config.js`. Like this:
|
|
|
|
```javascript
|
|
import type { NextConfig } from "next";
|
|
import grabDist from "@moduletrace/buncid/dist/rebuilds/next-js/grabDist";
|
|
|
|
const distDir = grabDist();
|
|
|
|
const nextConfig: NextConfig = {
|
|
/* config options here */
|
|
reactStrictMode: true,
|
|
distDir,
|
|
};
|
|
|
|
export default nextConfig;
|
|
```
|
|
|
|
That's it. This dynamically handles your distribution directory for both `dev` and `start` scripts. Your `development` environment uses the `.next` directory, while your `production` environment uses the `.dist` directory.
|