merge next.config files
This commit is contained in:
@@ -1,7 +1,38 @@
|
||||
import type { NextConfig } from "next";
|
||||
/** @type {import('next').NextConfig} */
|
||||
const nextConfig = {
|
||||
images: {
|
||||
remotePatterns: [
|
||||
{
|
||||
protocol: 'http', // для локал девеломпента
|
||||
hostname: '127.0.0.1',
|
||||
port: '8000',
|
||||
pathname: '**',
|
||||
},
|
||||
],
|
||||
},
|
||||
outputFileTracingExcludes: {
|
||||
'./**': ['./assets/big-models/**/*'],
|
||||
},
|
||||
async rewrites() {
|
||||
const backend = process.env.BACKEND_URL || 'http://127.0.0.1:8000/api/v1'
|
||||
return [
|
||||
{
|
||||
source: '/static-models/:path*',
|
||||
destination: '/api/big-models/:path*',
|
||||
},
|
||||
{
|
||||
source: '/api/v1/account/user',
|
||||
destination: `${backend}/account/user/`,
|
||||
},
|
||||
{
|
||||
source: '/api/v1/:path*',
|
||||
destination: `${backend}/:path*`,
|
||||
},
|
||||
]
|
||||
},
|
||||
experimental: {
|
||||
webpackBuildWorker: false,
|
||||
},
|
||||
}
|
||||
|
||||
const nextConfig: NextConfig = {
|
||||
/* config options here */
|
||||
};
|
||||
|
||||
export default nextConfig;
|
||||
module.exports = nextConfig
|
||||
|
||||
Reference in New Issue
Block a user