stacker.news/next.config.js

33 lines
853 B
JavaScript
Raw Normal View History

2021-07-15 20:49:13 +00:00
const { withPlausibleProxy } = require('next-plausible')
module.exports = withPlausibleProxy()({
2021-10-07 03:26:57 +00:00
compress: false,
2021-10-25 19:49:46 +00:00
experimental: {
scrollRestoration: true
},
2021-10-20 19:57:11 +00: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 18:37:59 +00:00
const { RuntimeSources } = require('/opt/elasticbeanstalk/deployment/app_version_manifest.json') // eslint-disable-line
2021-10-20 19:57:11 +00:00
return Object.keys(RuntimeSources['stacker.news'])[0]
},
2021-07-15 23:06:21 +00:00
async rewrites () {
return [
{
source: '/faq',
destination: '/items/349'
2021-09-02 17:49:17 +00:00
},
{
source: '/story',
destination: '/items/1620'
2021-10-07 18:37:59 +00:00
},
{
source: '/.well-known/lnurlp/:username',
destination: '/api/lnurlp/:username'
2021-07-15 23:06:21 +00:00
}
]
}
2021-07-15 20:49:13 +00:00
})