16 lines
535 B
JavaScript
16 lines
535 B
JavaScript
/** @type {import('next').NextConfig} */
|
|
const isProd = process.env.NODE_ENV === 'production'
|
|
|
|
const nextConfig = {
|
|
// Avoid dev/prod builds clobbering each other on Windows (causing missing _next/static files).
|
|
...(isProd ? { output: 'standalone' } : {}),
|
|
distDir: isProd ? '.next-prod' : '.next-dev',
|
|
webpack: (config, { dev }) => {
|
|
// Webpack filesystem cache is occasionally flaky on Windows and can lead to missing vendor-chunks.
|
|
if (dev) config.cache = false
|
|
return config
|
|
},
|
|
}
|
|
|
|
module.exports = nextConfig
|