vkorobtsev-nextJs/next.config.js
2024-04-19 19:21:34 +07:00

30 lines
535 B
JavaScript

const withBundleAnalyzer = require("@next/bundle-analyzer")({
enabled: process.env.ANALYZE === "true",
});
module.exports = withBundleAnalyzer({
// your Next.js configuration
images: {
domains: ["i.scdn.co"],
},
webpack: (config, options) => {
config.module.rules.push({
test: /\.pdf$/i,
type: "asset/source",
});
return config;
},
async headers() {
return [
{
source: "/sitemap.xml.gz",
headers: [
{
key: "Content-Type",
value: "application/gzip",
},
],
},
];
},
});