- Updated routing for mail settings to redirect to the new settings layout. - Introduced new account layout and section components for better organization. - Replaced hardcoded paths with constants for account and mail settings to enhance maintainability. - Removed deprecated mail settings layout and integrated it into the new settings structure. - Enhanced user experience by streamlining navigation between account and mail settings.
80 lines
1.8 KiB
JavaScript
80 lines
1.8 KiB
JavaScript
/*
|
|
* Copyright (c) 2026 Eliott Guillaumin
|
|
* All rights reserved.
|
|
*/
|
|
import path from "node:path"
|
|
import { fileURLToPath } from "node:url"
|
|
|
|
/** @type {import('next').NextConfig} */
|
|
const projectRoot = path.dirname(fileURLToPath(import.meta.url))
|
|
|
|
const ultiProxyOrigin = process.env.ULTI_PROXY_ORIGIN ?? "http://127.0.0.1"
|
|
|
|
const nextConfig = {
|
|
output: "standalone",
|
|
// Docker standalone tracing only — do not set turbopack.root to projectRoot:
|
|
// breaks Tailwind @import resolution (resolves from parent /Users/red/workdev).
|
|
outputFileTracingRoot: projectRoot,
|
|
allowedDevOrigins: ['192.168.0.20', '127.0.0.1', 'localhost', '100.120.4.66'],
|
|
async redirects() {
|
|
return [
|
|
{
|
|
source: "/mail/settings",
|
|
destination: "/settings",
|
|
permanent: true,
|
|
},
|
|
{
|
|
source: "/mail/settings/:section*",
|
|
destination: "/settings/:section*",
|
|
permanent: true,
|
|
},
|
|
{
|
|
source: "/compte",
|
|
destination: "/account",
|
|
permanent: true,
|
|
},
|
|
{
|
|
source: "/compte/:section*",
|
|
destination: "/account/:section*",
|
|
permanent: true,
|
|
},
|
|
]
|
|
},
|
|
async rewrites() {
|
|
return [
|
|
{
|
|
source: "/api/v1/:path*",
|
|
destination: `${ultiProxyOrigin}/api/v1/:path*`,
|
|
},
|
|
{
|
|
source: "/ai/:path*",
|
|
destination: `${ultiProxyOrigin}/ai/:path*`,
|
|
},
|
|
{
|
|
source: "/ai",
|
|
destination: `${ultiProxyOrigin}/ai`,
|
|
},
|
|
]
|
|
},
|
|
typescript: {
|
|
ignoreBuildErrors: true,
|
|
},
|
|
images: {
|
|
unoptimized: true,
|
|
},
|
|
turbopack: {
|
|
resolveAlias: {
|
|
canvas: "./lib/empty-module.mjs",
|
|
},
|
|
},
|
|
webpack: (config) => {
|
|
config.resolve.alias = {
|
|
...config.resolve.alias,
|
|
canvas: false,
|
|
}
|
|
return config
|
|
},
|
|
}
|
|
|
|
export default nextConfig
|