Rocky_Mountain_Vending/next.config.mjs
DMleadgen 46d973904b
Initial commit: Rocky Mountain Vending website
Next.js website for Rocky Mountain Vending company featuring:
- Product catalog with Stripe integration
- Service areas and parts pages
- Admin dashboard with Clerk authentication
- SEO optimized pages with JSON-LD structured data

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-02-12 16:22:15 -07:00

86 lines
2.8 KiB
JavaScript

/** @type {import('next').NextConfig} */
import bundleAnalyzer from '@next/bundle-analyzer'
const withBundleAnalyzer = bundleAnalyzer({
enabled: process.env.ANALYZE === 'true',
})
const nextConfig = {
// Enable standalone output for Docker
output: 'standalone',
typescript: {
ignoreBuildErrors: true,
},
// Optimize package imports for better bundle size and faster builds
// This transforms barrel imports to direct imports at build time
// See: https://vercel.com/blog/how-we-optimized-package-imports-in-next-js
experimental: {
optimizePackageImports: [
'lucide-react',
'@radix-ui/react-slot',
'@radix-ui/react-dialog',
'@radix-ui/react-dropdown-menu',
'@radix-ui/react-navigation-menu',
'@radix-ui/react-tooltip',
'@radix-ui/react-popover',
'@radix-ui/react-select',
'@radix-ui/react-tabs',
'@radix-ui/react-accordion',
'@radix-ui/react-alert-dialog',
'@radix-ui/react-avatar',
'@radix-ui/react-checkbox',
'@radix-ui/react-collapsible',
'@radix-ui/react-context-menu',
'@radix-ui/react-hover-card',
'@radix-ui/react-label',
'@radix-ui/react-menubar',
'@radix-ui/react-progress',
'@radix-ui/react-radio-group',
'@radix-ui/react-scroll-area',
'@radix-ui/react-separator',
'@radix-ui/react-slider',
'@radix-ui/react-switch',
'@radix-ui/react-toggle',
'@radix-ui/react-toggle-group',
'@radix-ui/react-toast',
'recharts',
],
},
// Temporarily disable Turbopack to fix MIME type issues
// Set turbopack root to silence workspace detection warning
// This tells Next.js to use the current directory (code/) as the root
// turbopack: {
// root: process.cwd(),
// },
images: {
// Image optimization disabled for static export (GHL hosting)
// Static export doesn't support Next.js Image optimization
unoptimized: true,
remotePatterns: [
{
protocol: 'https',
hostname: 'rockymountainvending.com',
pathname: '/wp-content/uploads/**',
},
{
protocol: 'https',
hostname: 'www.rockymountainvending.com',
pathname: '/wp-content/uploads/**',
},
],
// Image optimization settings
formats: ['image/webp', 'image/avif'],
deviceSizes: [640, 750, 828, 1080, 1200, 1920, 2048, 3840],
imageSizes: [16, 32, 48, 64, 96, 128, 256, 384],
// Performance optimizations
minimumCacheTTL: 60,
dangerouslyAllowSVG: false,
contentSecurityPolicy: "default-src 'self'; script-src 'none'; sandbox;",
},
// Headers and redirects are not supported in static export (GHL hosting)
// These would need to be configured at the hosting level (GHL/CDN)
// async headers() { ... },
// async redirects() { ... },
}
export default withBundleAnalyzer(nextConfig)