stacker.news/next.config.js

28 lines
733 B
JavaScript
Raw Normal View History

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-05 12:28:22 -07:00
generateBuildId: async () => {
2021-10-05 13:01:40 -07:00
// 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-05 13:01:40 -07:00
return Object.keys(RuntimeSources['stacker.news'])[0]
2021-10-05 12:28:22 -07:00
},
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
}
]
}
2021-07-15 15:49:13 -05:00
})