asdasd
This commit is contained in:
@@ -7,7 +7,7 @@ This document provides instructions for building the project on slower CPUs or r
|
||||
Run the optimized build using:
|
||||
|
||||
```bash
|
||||
npm run build:optimized
|
||||
pnpm run build:optimized
|
||||
```
|
||||
|
||||
## Optimization Features
|
||||
@@ -26,7 +26,7 @@ If you need to manually optimize the build process:
|
||||
|
||||
### 1. Clean the caches
|
||||
```bash
|
||||
npm run clean
|
||||
pnpm run clean
|
||||
```
|
||||
|
||||
### 2. Set Node.js memory limit
|
||||
@@ -36,12 +36,12 @@ export NODE_OPTIONS="--max-old-space-size=4096"
|
||||
|
||||
### 3. Skip non-essential checks
|
||||
```bash
|
||||
NEXT_SKIP_LINT=1 NEXT_SKIP_TS_CHECK=1 npm run build
|
||||
NEXT_SKIP_LINT=1 NEXT_SKIP_TS_CHECK=1 pnpm run build
|
||||
```
|
||||
|
||||
### 4. Use SWC compiler with optimized settings
|
||||
```bash
|
||||
NEXT_TELEMETRY_DISABLED=1 npm run build:fast
|
||||
NEXT_TELEMETRY_DISABLED=1 pnpm run build:fast
|
||||
```
|
||||
|
||||
## Configuration Files
|
||||
@@ -49,7 +49,7 @@ NEXT_TELEMETRY_DISABLED=1 npm run build:fast
|
||||
The following configuration files have been optimized:
|
||||
|
||||
- **next.config.mjs**: Contains SWC optimizations and standalone output
|
||||
- **.npmrc**: Configures Node.js memory limits and disables notifications
|
||||
- **.pnpmrc**: Configures Node.js memory limits and disables notifications
|
||||
- **.env.production**: Sets environment variables for production builds
|
||||
|
||||
## Troubleshooting
|
||||
@@ -60,7 +60,7 @@ If you encounter "JavaScript heap out of memory" errors, try:
|
||||
|
||||
```bash
|
||||
export NODE_OPTIONS="--max-old-space-size=2048"
|
||||
npm run build:fast
|
||||
pnpm run build:fast
|
||||
```
|
||||
|
||||
### Slow Builds
|
||||
|
||||
Reference in New Issue
Block a user