feat: complete dynamic JSON-driven photo tools frontend connected to FastAPI backend
This commit is contained in:
@@ -0,0 +1,26 @@
|
||||
/** @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;
|
||||
Reference in New Issue
Block a user