forked from Synthetixio/staking
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathnext.config.js
38 lines (32 loc) · 847 Bytes
/
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
// next.config.js
const withPlugins = require('next-compose-plugins');
const optimizedImages = require('next-optimized-images');
// all the dynamic pages need to be defined here (this needs to be imported from the routes)
const stakingPages = ['/staking', '/staking/burn', '/staking/mint'].reduce((pages, page) => {
pages[page] = {
page: '/staking/[[...action]]',
};
return pages;
}, {});
const earnPages = [
'/earn',
'/earn/claim',
'/earn/curve-LP',
'/earn/iBTC-LP',
'/earn/iETH-LP',
].reduce((pages, page) => {
pages[page] = {
page: '/earn/[[...pool]]',
};
return pages;
}, {});
module.exports = withPlugins([[optimizedImages]], {
trailingSlash: !!process.env.NEXT_PUBLIC_TRAILING_SLASH_ENABLED,
exportPathMap: function (defaultPathMap) {
return {
...defaultPathMap,
...stakingPages,
...earnPages,
};
},
});