-
Notifications
You must be signed in to change notification settings - Fork 4
/
next.config.js
36 lines (34 loc) · 990 Bytes
/
next.config.js
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
require('dotenv');
module.exports = {
// this line is used to allow nextjs to use this esModule in ssr
// it allows to import the lib from the es6 patter in all components
// https://github.com/sheshbabu/react-frappe-charts#with-nextjs
async redirects() {
return [
{
source: '/download/:path*',
destination: '/api/download/datapackage/:path*',
permanent: true,
},
];
},
images: {
remotePatterns: [
{
protocol: 'https',
hostname: 'i.ytimg.com',
port: '',
pathname: '/vi/**',
},
],
},
//the env variables are set here to access in browser
env: {
API_BASE_URL: process.env.API_BASE_URL,
DEFAULT_API_BASE_URL_V2: process.env.DEFAULT_API_BASE_URL_V2,
ID_ANALYTICS_GA4: process.env.ID_ANALYTICS_GA4,
S3_REPO_URL: process.env.S3_REPO_URL,
NEW_RELIC_APP_NAME: process.env.NEW_RELIC_APP_NAME,
NEW_RELIC_LICENSE_KEY: process.env.NEW_RELIC_LICENSE_KEY,
},
};