-
Notifications
You must be signed in to change notification settings - Fork 0
/
next.config.js
40 lines (36 loc) · 1.08 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
module.exports = {
webpack(config, { webpack, isServer, nextRuntime }) {
config.resolve.fallback = {
// if you miss it, all the other options in fallback, specified
// by next.js will be dropped.
...config.resolve.fallback,
fs: false, // the solution
};
// Avoid AWS SDK Node.js require issue
if (isServer && nextRuntime === "nodejs")
config.plugins.push(
new webpack.IgnorePlugin({ resourceRegExp: /^aws-crt$/ })
);
// config.externals.push({
// "@aws-sdk/signature-v4-multi-region":
// "commonjs @aws-sdk/signature-v4-multi-region",
// });
return config;
},
images: {
remotePatterns: [
{
protocol: "https",
hostname: "taste-gallery.s3.us-west-1.amazonaws.com",
port: "",
pathname: "/**", // remove first slash?
},
{
protocol: "https",
hostname: "taste-images.stlr.cx",
port: "",
pathname: "/**", // remove first slash?
},
], // https://taste-gallery.s3.us-west-1.amazonaws.com/photog/016pv4ndnwna1.webp
},
};