-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathnext.config.js
44 lines (40 loc) · 1.01 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
37
38
39
40
41
42
43
44
const { i18n } = require('./next-i18next.config');
/** @type {import('next').NextConfig} */
const nextConfig = {
reactStrictMode: true,
images: {
domains: ['res.cloudinary.com'],
},
i18n,
webpack: (config) => {
// Fix for rjsf (https://github.com/rjsf-team/react-jsonschema-form/issues/2762)
config.resolve.fallback = {
...config.resolve.fallback,
'@material-ui/core': false,
'@material-ui/icons': false,
};
// Allows you to import SVGs as React Components
config.module.rules.push({
test: /\.svg$/i,
issuer: /\.jsx?$/,
use: [
{
loader: '@svgr/webpack',
options: {
replaceAttrValues: { '#5E42CC': '{props.color || "#5E42CC"}' },
svgoConfig: {
plugins: [
{
name: 'removeViewBox',
active: false,
},
],
},
},
},
],
});
return config;
},
};
module.exports = nextConfig;