26 lines
554 B
TypeScript
26 lines
554 B
TypeScript
import type { NextConfig } from "next";
|
|
|
|
const nextConfig: NextConfig = {
|
|
// Turbopack (default in `next dev` and `next build` on Next 16)
|
|
turbopack: {
|
|
rules: {
|
|
"*.svg": {
|
|
loaders: ["@svgr/webpack"],
|
|
as: "*.js",
|
|
},
|
|
},
|
|
},
|
|
|
|
// Webpack fallback — used if anyone opts out of Turbopack via `next build --no-turbopack`
|
|
webpack(config) {
|
|
config.module.rules.push({
|
|
test: /\.svg$/i,
|
|
issuer: /\.[jt]sx?$/,
|
|
use: ["@svgr/webpack"],
|
|
});
|
|
return config;
|
|
},
|
|
};
|
|
|
|
export default nextConfig;
|