-
Notifications
You must be signed in to change notification settings - Fork 11
/
Copy pathnext.config.js
39 lines (38 loc) · 1.05 KB
/
next.config.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
const { BundleAnalyzerPlugin } = require("webpack-bundle-analyzer");
// const DuplicatePackageCheckerPlugin = require("duplicate-package-checker-webpack-plugin");
// const urlPaths = require("./public/urls.json");
module.exports = {
// async redirects() {
// return urlPaths.redirects;
// },
// async headers() {
// return [
// {
// source: "/blog/:slug*(svg|jpg|png)",
// locale: false,
// headers: [
// {
// key: "Cache-Control",
// value: "public, max-age=2592000, must-revalidate",
// },
// ],
// },
// ];
// },
images: {
domains: ["dtyyfw8oh5wdw.cloudfront.net", "cdn.dennisokeeffe.com"],
},
webpack: (config, { isServer }) => {
// config.plugins.push(new DuplicatePackageCheckerPlugin());
if (process.env.ANALYZE) {
config.plugins.push(
new BundleAnalyzerPlugin({
analyzerMode: "server",
analyzerPort: isServer ? 8888 : 8889,
openAnalyzer: true,
})
);
}
return config;
},
};