-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathnext.config.js
36 lines (34 loc) · 1.02 KB
/
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
const ESLintPlugin = require('eslint-webpack-plugin');
const withAntdLess = require('next-plugin-antd-less');
const path = require('path');
module.exports = () => {
const nextConfig = withAntdLess({
modifyVars: { '@primary-color': '#6a549e' },
lessVarsFilePathAppendToEndOfContent: false,
images: {
disableStaticImages: true,
},
sassOptions: {
includePaths: [path.join(__dirname, 'src', 'styles')],
},
webpack: (config) => {
// Important: return the modified config
config.plugins.push(new ESLintPlugin({ extensions: ['ts', 'tsx'], failOnError: false }));
return config;
},
serverRuntimeConfig: {
// Will only be available on the server side
OPENAPI_ADDR: process.env.OPENAPI_ADDR, // Pass through env variables
},
async redirects() {
return [
{
source: '/',
destination: '/demo', // Matched parameters can be used in the destination
permanent: false,
},
];
},
});
return nextConfig;
};