forked from qudacki/neeedle
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathnext.config.js
32 lines (31 loc) · 915 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
const withPlugins = require('next-compose-plugins')
const withBundleAnalyzer = require('@next/bundle-analyzer')({
enabled: process.env.ANALYZE === 'true',
})
module.exports = withPlugins([[withBundleAnalyzer]], {
reactStrictMode: true,
webpack(config, options) {
config.module.rules.push({
test: /\.svg$/,
use: [
{
loader: '@svgr/webpack',
options: {
svgoConfig: {
plugins: {
// see: https://github.com/svg/svgo#what-it-can-do
removeViewBox: false, // to enable overwriteing width/height by CSS
moveElemsAttrsToGroup: false, // to prevent attribute destruction for overwriting color}
},
},
},
},
],
})
config.module.rules.push({
test: /\.mdx?$/,
use: ['babel-loader', '@mdx-js/loader'],
})
return config
},
})