status-frontend/next.config.js

29 lines
692 B
JavaScript
Raw Normal View History

2022-10-18 16:27:41 +02:00
module.exports = (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-09-29 16:25:10 +02:00
2022-10-18 16:27:41 +02:00
return nextConfig
}