mirror of
https://github.com/oceanprotocol/status
synced 2024-11-22 01:36:59 +01:00
42 lines
880 B
JavaScript
42 lines
880 B
JavaScript
const withCSS = require('@zeit/next-css')
|
|
|
|
// eslint-disable-next-line no-unused-vars
|
|
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
|
|
}
|
|
})
|
|
}
|
|
|
|
const withBundleAnalyzer = require('@next/bundle-analyzer')({
|
|
enabled: process.env.ANALYZE === 'true'
|
|
})
|
|
|
|
module.exports = withBundleAnalyzer(
|
|
withSvgr(
|
|
withCSS({
|
|
cssModules: true,
|
|
cssLoaderOptions: {
|
|
localIdentName: '[local]___[hash:base64:5]'
|
|
}
|
|
})
|
|
)
|
|
)
|