-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathnext.config.js
More file actions
34 lines (30 loc) · 875 Bytes
/
next.config.js
File metadata and controls
34 lines (30 loc) · 875 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
const themeUISvgrTemplate = require('./config/themeUISvgrTemplate');
/** @type {import('next').NextConfig} */
module.exports = {
reactStrictMode: true,
experimental: {
outputStandalone: true,
},
webpack: (config) => {
const imageLoaderRule = config.module.rules.findIndex(
(rule) => rule.loader === 'next-image-loader',
);
config.module.rules[imageLoaderRule].test =
/\.(png|jpg|jpeg|gif|webp|avif|ico|bmp)$/i;
config.module.rules.unshift({
test: /\.svg$/,
loader: require.resolve('@svgr/webpack'),
options: {
prettier: false,
titleProp: true,
svgo: true,
template: themeUISvgrTemplate,
svgoConfig: {
plugins: [{ name: 'removeViewBox', active: false }],
},
},
issuer: { and: [/\.(ts|tsx|js|jsx|md|mdx)$/] },
});
return config;
},
};