46 lines
895 B
JavaScript
46 lines
895 B
JavaScript
const config = require('config')
|
|
const constants = config.get('constants')
|
|
|
|
/** @type {import('next').NextConfig} */
|
|
|
|
const rewrites = async () => {
|
|
return [
|
|
{
|
|
source: '/orbisapi/:path*',
|
|
destination: 'http://localhost:9000/:path*' // Proxy to Backend
|
|
}
|
|
]
|
|
}
|
|
|
|
const redirects = async () => {
|
|
return [
|
|
{
|
|
source: '/mantenimientos',
|
|
destination: constants.publicPath,
|
|
basePath: true,
|
|
permanent: false
|
|
}
|
|
]
|
|
}
|
|
|
|
const nextConfig = {
|
|
env: {
|
|
...constants
|
|
},
|
|
images: {
|
|
domains: ['www.via-asesores.com', 'gt.via-asesores.com'],
|
|
unoptimized: true, // solo para generar sitio estatico
|
|
},
|
|
assetPrefix: constants.publicPath,
|
|
basePath: constants.publicPath,
|
|
// redirects,
|
|
compiler: {
|
|
styledComponents: true,
|
|
},
|
|
rewrites,
|
|
reactStrictMode: true,
|
|
swcMinify: true,
|
|
}
|
|
|
|
module.exports = nextConfig
|