Build process overview
Biovity uses Next.js 16 with Turbopack for fast builds. The production build compiles your application, optimizes assets, and prepares everything for deployment.Build commands
Production build
Create an optimized production build:next build --turbopack, which:
- Compiles TypeScript to JavaScript
- Bundles and optimizes all pages and components
- Generates static pages where possible
- Optimizes images and assets
- Creates production-ready output in
.nextdirectory
Start production server
After building, start the production server locally:next start and serves your built application on port 3000.
Development server
For development with hot reload:Pre-build checks
Before building for production, run these checks to ensure code quality:Type check
Verify TypeScript types are correct:This runs
tsc --noEmit to check for type errors without generating output files.Lint and format
Check and fix code style issues with Biome:This runs
biome check --write . to lint and auto-fix formatting issues.Build configuration
Biovity’s build is configured with the following optimizations:Turbopack
The project uses Turbopack (--turbopack flag) for faster builds. Turbopack is Next.js’s Rust-based bundler that provides:
- Faster incremental builds
- Improved development experience
- Better memory efficiency
Code quality
Biome is configured for strict code quality:- Line width: 100 characters
- Semicolons: as needed
- Strict linting rules with recommended and stylistic rules enabled
- TypeScript strict mode with
noExplicitAnyas error
Dependencies
Trusted dependencies that can run install scripts:sharp- Image optimizationunrs-resolver- Module resolution
Build output
After a successful build, you’ll find:.next/- Production build output (do not commit to version control).next/static/- Static assets (CSS, JS, images).next/server/- Server-side code.next/cache/- Build cache for faster subsequent builds
Build errors
If your build fails, check for:Type errors
Linting errors
Environment variables
Ensure all required environment variables are set. See the environment variables guide for details.Missing dependencies
Install all dependencies:CI/CD integration
For automated builds in CI/CD pipelines:Most deployment platforms like Vercel automatically detect and run the build command. You typically don’t need to configure this manually.
Performance optimization
The build process includes several automatic optimizations:- Code splitting - Splits code into smaller chunks for faster loading
- Tree shaking - Removes unused code from the bundle
- Minification - Compresses JavaScript and CSS
- Image optimization - Automatically optimizes images with
sharp - Static generation - Pre-renders pages at build time where possible
Build time expectations
Typical build times:- Small projects: 30-60 seconds
- Medium projects: 1-2 minutes
- Large projects: 2-5 minutes
- Number of pages and components
- Size and number of dependencies
- Static generation vs server-side rendering
- Image optimization workload