2021-07-15 15:49:13 -05:00
|
|
|
const { withPlausibleProxy } = require('next-plausible')
|
|
|
|
|
|
|
|
module.exports = withPlausibleProxy()({
|
2021-10-06 20:26:57 -07:00
|
|
|
compress: false,
|
2021-10-25 14:49:46 -05:00
|
|
|
experimental: {
|
|
|
|
scrollRestoration: true
|
|
|
|
},
|
2021-10-20 14:57:11 -05:00
|
|
|
generateBuildId: process.env.NODE_ENV === 'development'
|
|
|
|
? undefined
|
|
|
|
: async () => {
|
|
|
|
// use the app version which eb doesn't otherwise give us
|
|
|
|
// as the build id
|
2021-10-07 11:37:59 -07:00
|
|
|
const { RuntimeSources } = require('/opt/elasticbeanstalk/deployment/app_version_manifest.json') // eslint-disable-line
|
2021-10-20 14:57:11 -05:00
|
|
|
return Object.keys(RuntimeSources['stacker.news'])[0]
|
|
|
|
},
|
2021-07-15 18:06:21 -05:00
|
|
|
async rewrites () {
|
|
|
|
return [
|
|
|
|
{
|
|
|
|
source: '/faq',
|
|
|
|
destination: '/items/349'
|
2021-09-02 12:49:17 -05:00
|
|
|
},
|
|
|
|
{
|
|
|
|
source: '/story',
|
|
|
|
destination: '/items/1620'
|
2021-10-07 11:37:59 -07:00
|
|
|
},
|
|
|
|
{
|
|
|
|
source: '/.well-known/lnurlp/:username',
|
|
|
|
destination: '/api/lnurlp/:username'
|
2021-07-15 18:06:21 -05:00
|
|
|
}
|
|
|
|
]
|
2022-01-19 16:05:58 -06:00
|
|
|
},
|
|
|
|
async redirects () {
|
|
|
|
return [
|
|
|
|
{
|
|
|
|
source: '/statistics',
|
|
|
|
destination: '/satistics?inc=invoice,withdrawal',
|
|
|
|
permanent: true
|
|
|
|
}
|
|
|
|
]
|
2021-07-15 18:06:21 -05:00
|
|
|
}
|
2021-07-15 15:49:13 -05:00
|
|
|
})
|