Linking backend data to frontend
This commit is contained in:
28
frontend/next.config.js
Normal file
28
frontend/next.config.js
Normal file
@@ -0,0 +1,28 @@
|
||||
/** @type {import('next').NextConfig} */
|
||||
const nextConfig = {
|
||||
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,
|
||||
},
|
||||
}
|
||||
|
||||
module.exports = nextConfig
|
||||
Reference in New Issue
Block a user