mirror of
https://github.com/kremalicious/portfolio.git
synced 2024-12-22 09:13:19 +01:00
Matthias Kretschmann
447cada700
* next.js + typescript * more testing * script updates * fixes * favicon generation * testing * readme updates * tweaks * tweaks * move tests * image tweaks * ci tweaks * commit next-env.d.ts for ci * migrations * fixes * fixes * ci tweaks * new animations * project preview tweaks * add codeclimate config * dark mode refactor, test tweaks * readme updates * animation tweaks * animate in loaded images * test update * update humans.txt
33 lines
723 B
JavaScript
33 lines
723 B
JavaScript
// @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
|
|
}
|
|
}
|
|
|
|
return nextConfig
|
|
}
|
|
|
|
export default next
|