Answered
Based on this article from NEXTJS own website, I added this to next.config.ts
turbopack: {
rules: {
"*.svg": {
loaders: ["@svgr/webpack"],
as: "*.js",
},
},
},
I already read this article, but I was adding the snippet as is, which is not the right way to do it.
Correct Way
import type { NextConfig } from "next";
const nextConfig: NextConfig = {
// INSIDE CONST, REMOVE MODULE.EXPORTS
turbopack: {
rules: {
"*.svg": {
loaders: ["@svgr/webpack"],
as: "*.js",
},
},
},
};
export default nextConfig;