Files
payload/next.config.mjs
Jarrod Flesch 347464250e fix: duplicate options appearing in relationship where builder (#6557)
- enables reactStrictMode by default
- enables reactCompiler by default
- fixes cases where ID's set to 0 broke UI
2024-05-30 00:35:59 -04:00

40 lines
870 B
JavaScript

import bundleAnalyzer from '@next/bundle-analyzer'
import withPayload from './packages/next/src/withPayload.js'
const withBundleAnalyzer = bundleAnalyzer({
enabled: process.env.ANALYZE === 'true',
})
// eslint-disable-next-line no-restricted-exports
export default withBundleAnalyzer(
withPayload({
eslint: {
ignoreDuringBuilds: true,
},
typescript: {
ignoreBuildErrors: true,
},
async redirects() {
return [
{
destination: '/admin',
permanent: true,
source: '/',
},
]
},
images: {
domains: ['localhost'],
},
webpack: (webpackConfig) => {
webpackConfig.resolve.extensionAlias = {
'.cjs': ['.cts', '.cjs'],
'.js': ['.ts', '.tsx', '.js', '.jsx'],
'.mjs': ['.mts', '.mjs'],
}
return webpackConfig
},
}),
)