-
Notifications
You must be signed in to change notification settings - Fork 0
/
next.config.js
51 lines (47 loc) · 1.2 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
const { withHeadlessConfig } = require("@headstartwp/next/config");
const headlessConfig = require("./headless.config");
/**
* Update whatever you need within the nextConfig object.
*
* @type {import('next').NextConfig}
*/
const nextConfig = {
eslint: {
ignoreDuringBuilds: true,
},
webpack: (config) => {
/**
* Critical: prevents " ⨯ ./node_modules/canvas/build/Release/canvas.node
* Module parse failed: Unexpected character '�' (1:0)" error
*/
config.resolve.alias.canvas = false;
// You may not need this, it's just to support moduleResolution: 'node16'
config.resolve.extensionAlias = {
".js": [".js", ".ts", ".tsx"],
};
return config;
},
images: {
remotePatterns: [
{
protocol: "https",
hostname: "gistcdn.githack.com",
port: "",
},
{
protocol: "https",
hostname: "i.postimg.cc",
port: "",
},
{
protocol: "https",
hostname: "github.com",
port: "",
pathname: "/stephin-gasper/**",
},
],
formats: ["image/avif", "image/webp"],
},
optimizeFonts: false,
};
module.exports = withHeadlessConfig(nextConfig, headlessConfig);