-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathnext.config.js
109 lines (104 loc) · 2.75 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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
const withPlugins = require("next-compose-plugins");
// // const optimizedImages = require("next-optimized-images");
const path = require("path");
const withBundleAnalyzer = require("@next/bundle-analyzer")({
enabled: process.env.ANALYZE === "true",
});
const plugins = [
[
withBundleAnalyzer,
{
poweredByHeader: false,
trailingSlash: true,
basePath: "",
reactStrictMode: true,
},
],
// [
// // optimizedImages,
// {
// // these are the default values so you don't have to provide them
// // if they are good enough for your use-case.
// // but you can overwrite them here with any valid value you want.
// inlineImageLimit: 8192,
// // densities: [1, 2],
// // breakpoints: [],
// imagesFolder: "images",
// imagesName: "[name]-[hash].[ext]",
// handleImages: ["jpg", "jpeg", "png", "svg", "webp", "gif"],
// removeOriginalExtension: false,
// optimizeImages: true,
// optimizeImagesInDev: true,
// mozjpeg: {
// quality: 80,
// },
// optipng: {
// optimizationLevel: 3,
// },
// pngquant: false,
// gifsicle: {
// interlaced: true,
// optimizationLevel: 3,
// },
// svgo: {
// // enable/disable svgo plugins here
// },
// webp: {
// preset: "default",
// quality: 75,
// },
// responsive: {
// adapter: require("responsive-loader/sharp"),
// sizes: [300, 320, 640, 960, 1200, 1800, 2400],
// placeholder: true,
// placeholderSize: 40,
// },
// },
// ],
];
const nextConfig = {
// i18n,
eslint: {
// Warning: This allows production builds to successfully complete even if
// your project has ESLint errors.
ignoreDuringBuilds: true,
},
experimental: {
appDir: true,
fontLoaders: [
// {
// loader: "@next/font/google",
// options: { weight: ["300", "400", "500", "700"] },
// },
{ loader: "@next/font/google", options: { subsets: ["latin"] } },
],
},
// images: {
// loader: "custom",
// disableStaticImages: true,
// },
sassOptions: {
includePaths: [path.join(__dirname, "styles")],
},
images: {
// unoptimized: true,
// loader: "custom",
dangerouslyAllowSVG: true,
contentSecurityPolicy: "default-src 'self'; script-src 'none'; sandbox;",
remotePatterns: [
{
protocol: "https",
hostname: "burnstoves.com",
},
{
protocol: "https",
hostname: "burnstoves-assets.nyc3.cdn.digitaloceanspaces.com",
},
{
protocol: "https",
hostname: "res.cloudinary.com",
},
],
},
};
module.exports = withPlugins(plugins, nextConfig);