vkorobtsev-nextJs/next.config.js
2024-02-12 18:51:36 +07:00

27 lines
494 B
JavaScript

const withBundleAnalyzer = require("@next/bundle-analyzer")({
enabled: process.env.ANALYZE === "true",
});
module.exports = withBundleAnalyzer({
// your Next.js configuration
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",
},
],
},
];
},
});