Webpack SVGR not working in certain directories
Unanswered
Sun bear posted this in #help-forum
Sun bearOP
I've noticed that when switching to private folders (like done in the images you sent above) for better organisation, I get the following error when trying to render any icons, I'll attach the error & next config below.
2 Replies
Sun bearOP
/** @type {import('next').NextConfig} */
const nextConfig = {
webpack(config) {
config.module.rules.push({
test: /\.svg$/i,
issuer: /\.[jt]sx?$/,
use: ['@svgr/webpack'],
});
return config;
},
};
export default nextConfig;