-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathnext.config.js
52 lines (51 loc) · 1.27 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
const path = require("path");
const withImages = require("next-images");
module.exports = withImages({
swcMinify: true,
exclude: path.resolve(__dirname, "src/assets/svg"),
webpack(config, options) {
return config;
},
});
module.exports = {
// put the domains where images will be placed
images: {
// remotePatterns: ["place-hold.it", "media.giphy.com", "images.unsplash.com"],
remotePatterns: [
{
protocol: "https",
hostname: "images.unsplash.com",
port: "",
pathname: "/*",
},
{
protocol: "https",
hostname: "place-hold.it",
port: "",
pathname: "/*",
},
{
protocol: "https",
hostname: "media.giphy.com",
port: "",
pathname: "/media/**",
},
{
protocol: "http",
hostname: "localhost",
},
],
},
sassOptions: {
includePaths: [path.join(__dirname, "styles")],
},
env: {
// Will be available on both server and client
NEXT_PUBLIC_CONTENTFUL_SPACE_ID:
process.env.NEXT_PUBLIC_CONTENTFUL_SPACE_ID,
NEXT_PUBLIC_CONTENTFUL_ENVIROMENT:
process.env.NEXT_PUBLIC_CONTENTFUL_ENVIROMENT,
NEXT_PUBLIC_CONTENTFUL_ACCESS_TOKEN:
process.env.NEXT_PUBLIC_CONTENTFUL_ACCESS_TOKEN,
},
};