mirror of
https://github.com/Ladebeze66/devsite.git
synced 2025-12-15 21:46:49 +01:00
37 lines
739 B
TypeScript
37 lines
739 B
TypeScript
/** @type {import('next').NextConfig} */
|
|
|
|
require("dotenv").config();
|
|
|
|
console.log("🔍 Vérification NEXT_PUBLIC_API_URL:", process.env.NEXT_PUBLIC_API_URL);
|
|
|
|
const API_URL = process.env.NEXT_PUBLIC_API_URL || "https://api.fernandgrascalvet.com";
|
|
|
|
const nextConfig = {
|
|
reactStrictMode: true,
|
|
compress: false,
|
|
trailingSlash: false,
|
|
|
|
webpackDevMiddleware: (config: any) => {
|
|
config.watchOptions = {
|
|
poll: 1000,
|
|
aggregateTimeout: 300,
|
|
};
|
|
return config;
|
|
},
|
|
|
|
async rewrites() {
|
|
return [
|
|
{
|
|
source: "/api/:path*",
|
|
destination: `${API_URL}/api/:path*`,
|
|
},
|
|
];
|
|
},
|
|
|
|
images: {
|
|
domains: ["localhost", "api.fernandgrascalvet.com"],
|
|
},
|
|
};
|
|
|
|
module.exports = nextConfig;
|