mirror of
https://github.com/kremalicious/ipfs.git
synced 2024-06-15 17:03:32 +02:00
36 lines
715 B
JavaScript
36 lines
715 B
JavaScript
|
const withCSS = require('@zeit/next-css')
|
||
|
|
||
|
const withSvgr = (nextConfig = {}, nextComposePlugins = {}) => {
|
||
|
return Object.assign({}, nextConfig, {
|
||
|
webpack(config, options) {
|
||
|
config.module.rules.push({
|
||
|
test: /\.svg$/,
|
||
|
use: [
|
||
|
{
|
||
|
loader: '@svgr/webpack',
|
||
|
options: {
|
||
|
icon: true
|
||
|
}
|
||
|
}
|
||
|
]
|
||
|
})
|
||
|
|
||
|
if (typeof nextConfig.webpack === 'function') {
|
||
|
return nextConfig.webpack(config, options)
|
||
|
}
|
||
|
|
||
|
return config
|
||
|
}
|
||
|
})
|
||
|
}
|
||
|
|
||
|
module.exports = withSvgr(
|
||
|
withCSS({
|
||
|
cssModules: true,
|
||
|
cssLoaderOptions: {
|
||
|
importLoaders: 1,
|
||
|
localIdentName: '[local]___[hash:base64:5]'
|
||
|
}
|
||
|
})
|
||
|
)
|