-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathnext.config.js
More file actions
30 lines (25 loc) · 835 Bytes
/
next.config.js
File metadata and controls
30 lines (25 loc) · 835 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
const withBundleAnalyzer = require('@next/bundle-analyzer')({
enabled: process.env.ANALYZE === 'true',
})
/** @type {import('next').NextConfig} */
const nextConfig = {
reactStrictMode: true,
swcMinify: true,
images: {
domains: ['images.unsplash.com', 'via.placeholder.com', 'picsum.photos'],
unoptimized: true,
},
trailingSlash: true,
output: 'export', // enable static export via config
// Remove distDir - Next.js will output static files to 'out' by default with output: 'export'
// Improve build performance
compiler: {
removeConsole: process.env.NODE_ENV === 'production',
},
// Amplify-specific environment variables
env: {
CUSTOM_KEY: 'my-value',
},
// Removed exportPathMap - Next.js 14+ automatically handles static exports
}
module.exports = withBundleAnalyzer(nextConfig)