Files
n3wt-school/Front-End/next.config.mjs
N3WT DE COMPET b780e8b4ff fix: ajout des urls prod et demo
# Message de commit (conventionnel) :
#  Construction automatique depuis une branche aux formats:
#  - <type>-<ticket-id>-ma_super_description
#  - <type>-ma_super_description
# <type>(<scope>): <description> [#<ticket-id>]
# ex : feat(frontend): ajout de la gestion des utilisateurs dans le dashboard [#1]
#
# Types:
# - feat: Nouvelle fonctionnalité
# - fix: Correction de bug
# - docs: Documentation
# - style: Changements esthétiques
# - refactor: Refactorisation
# - test: Ajout/modification de tests
# - chore: Tâches diverses (e.g., mise à jour des dépendances)
#
# Scope: Optionnel (ex. backend, frontend, api, ci )
#
# Ticket ID: Référence à un ticket ou une issue (ex. [#123])
2025-06-01 13:28:28 +02:00

62 lines
1.6 KiB
JavaScript

import createNextIntlPlugin from 'next-intl/plugin';
import { createRequire } from 'module';
const require = createRequire(import.meta.url);
const pkg = require('./package.json');
const withNextIntl = createNextIntlPlugin();
/** @type {import('next').NextConfig} */
const nextConfig = {
output: 'standalone',
reactStrictMode: true,
experimental: {
instrumentationHook: true,
},
images: {
remotePatterns: [
{
protocol: 'https',
hostname: 'www.gravatar.com',
},
{
protocol: 'https',
hostname: 'api.demo.n3wtschool.com',
},
{
protocol: 'https',
hostname: 'api.prod.n3wtschool.com',
},
{
protocol: 'http',
hostname: 'localhost',
port: '8080',
},
],
},
env: {
NEXT_PUBLIC_APP_VERSION: pkg.version,
NEXT_PUBLIC_API_URL:
process.env.NEXT_PUBLIC_API_URL || 'http://localhost:8080',
NEXT_PUBLIC_WSAPI_URL:
process.env.NEXT_PUBLIC_WSAPI_URL || 'ws://localhost:8080',
NEXT_PUBLIC_USE_FAKE_DATA: process.env.NEXT_PUBLIC_USE_FAKE_DATA || 'false',
AUTH_SECRET: process.env.AUTH_SECRET || 'false',
NEXTAUTH_URL: process.env.NEXTAUTH_URL || 'http://localhost:3000',
DOCUSEAL_API_KEY: process.env.DOCUSEAL_API_KEY,
},
async rewrites() {
return [
{
source: '/api/documents/:path*',
destination: 'https://api.docuseal.com/v1/documents/:path*',
},
{
source: '/api/auth/:path*',
destination: '/api/auth/:path*', // Exclure les routes NextAuth des réécritures de proxy
},
];
},
};
export default withNextIntl(nextConfig);