-
Notifications
You must be signed in to change notification settings - Fork 7
/
next.config.js
54 lines (52 loc) · 1.56 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
const path = require("path");
const allowedImageWordPressDomain = new URL(process.env.NEXT_PUBLIC_WORDPRESS_URL).hostname
module.exports = {
trailingSlash: true,
async rewrites() {
return [
{
source: '/loja/',
destination: '/',
},
{
source: '/envio-e-prazo-de-entrega/',
destination: '/pagina/envio-e-prazo-de-entrega/',
},
{
source: '/politica-de-privacidade/',
destination: '/pagina/politica-de-privacidade/',
},
{
source: '/garantia-e-politica-de-reembolso/',
destination: '/pagina/garantia-e-politica-de-reembolso/',
},
{
source: '/sobre-nos/',
destination: '/pagina/sobre-nos/',
},
]
},
webpack: (config, options) => {
config.module.rules.push({
test: /\.html/,
use: [
options.defaultLoaders.babel,
{
loader: 'html-loader',
},
],
})
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'],
},
};