27 lines
694 B
JavaScript
27 lines
694 B
JavaScript
/** @type {import('next').NextConfig} */
|
|||
|
|
const nextConfig = {
|
||
|
|
reactStrictMode: true,
|
||
|
|
images: {
|
||
|
|
unoptimized: true,
|
||
|
|
},
|
||
|
|
experimental: {
|
||
|
|
serverComponentsExternalPackages: ['sharp'],
|
||
|
|
},
|
||
|
|
async redirects() {
|
||
|
|
try {
|
||
|
|
const fs = await import('fs');
|
||
|
|
const path = await import('path');
|
||
|
|
const redirectsPath = path.join(process.cwd(), 'content', 'redirects.json');
|
||
|
|
if (fs.existsSync(redirectsPath)) {
|
||
|
|
const data = JSON.parse(fs.readFileSync(redirectsPath, 'utf8'));
|
||
|
|
return Array.isArray(data) ? data : [];
|
||
|
|
}
|
||
|
|
} catch (e) {
|
||
|
|
console.warn('Could not load redirects.json', e);
|
||
|
|
}
|
||
|
|
return [];
|
||
|
|
},
|
||
|
|
};
|
||
|
|
|
||
|
|
export default nextConfig;
|