-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathnext.config.js
More file actions
37 lines (33 loc) · 892 Bytes
/
next.config.js
File metadata and controls
37 lines (33 loc) · 892 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
/**
* @type {import('next').NextConfig}
*/
const path = require('path'); // eslint-disable-line @typescript-eslint/no-var-requires
const defaultBasePath = '';
const defaultFallbackUrl = 'https://helpqueue.tamudatathon.com/:path*';
const nextConfig = {
sassOptions: {
includePaths: [path.join(__dirname)]
},
env: {
BASE_PATH: process.env.BASE_PATH || defaultBasePath,
DATABASE_URL: process.env.DATABASE_URL
},
basePath: process.env.BASE_PATH || defaultBasePath,
compiler: {
styledComponents: true
},
async rewrites() {
return {
fallback: [
// These rewrites are checked after both pages/public files
// and dynamic routes are checked
{
source: '/:path*',
basePath: false,
destination: process.env.FALLBACK_URL || defaultFallbackUrl
}
]
};
}
}
module.exports = nextConfig