2022-11-16 00:14:59 +01:00
|
|
|
// @ts-check
|
|
|
|
|
|
|
|
const next = (phase, { defaultConfig }) => {
|
|
|
|
/**
|
|
|
|
* @type {import('next').NextConfig}
|
|
|
|
*/
|
|
|
|
const nextConfig = {
|
|
|
|
webpack: (config, options) => {
|
|
|
|
config.module.rules.push(
|
|
|
|
{
|
|
|
|
test: /\.svg$/,
|
|
|
|
issuer: /\.(tsx|ts)$/,
|
|
|
|
use: [{ loader: '@svgr/webpack', options: { icon: true } }]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
test: /\.gif$/,
|
|
|
|
// yay for webpack 5
|
|
|
|
// https://webpack.js.org/guides/asset-management/#loading-images
|
|
|
|
type: 'asset/resource'
|
|
|
|
}
|
|
|
|
)
|
|
|
|
|
|
|
|
return typeof defaultConfig.webpack === 'function'
|
|
|
|
? defaultConfig.webpack(config, options)
|
|
|
|
: config
|
2022-11-16 20:04:06 +01:00
|
|
|
},
|
|
|
|
// https://nextjs.org/docs/api-reference/next.config.js/react-strict-mode
|
|
|
|
reactStrictMode: true
|
2022-11-16 00:14:59 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
return nextConfig
|
|
|
|
}
|
|
|
|
|
|
|
|
export default next
|