forked from imranhsayed/woo-next
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathnext.config.js
More file actions
25 lines (23 loc) · 742 Bytes
/
next.config.js
File metadata and controls
25 lines (23 loc) · 742 Bytes
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
const path = require("path");
const allowedImageWordPressDomain = new URL(process.env.NEXT_PUBLIC_WORDPRESS_URL).hostname
module.exports = {
trailingSlash: true,
webpackDevMiddleware: (config) => {
config.watchOptions = {
poll: 1000,
aggregateTimeout: 300,
};
return config;
},
sassOptions: {
includePaths: [path.join(__dirname, "styles")],
},
/**
* We specify which domains are allowed to be optimized.
* This is needed to ensure that external urls can't be abused.
* @see https://nextjs.org/docs/basic-features/image-optimization#domains
*/
images: {
domains: [ allowedImageWordPressDomain, 'via.placeholder.com' ],
},
};