go back to old build id gen

This commit is contained in:
keyan 2023-06-01 15:31:16 -05:00
parent 56314bac4e
commit ce6b055456

View File

@ -30,7 +30,15 @@ module.exports = withPWA({
experimental: { experimental: {
scrollRestoration: true scrollRestoration: true
}, },
generateBuildId: isProd ? async () => commitHash : undefined, // generateBuildId: isProd ? async () => commitHash : undefined,
generateBuildId: isProd
? async () => {
// use the app version which eb doesn't otherwise give us
// as the build id
const { RuntimeSources } = require('/opt/elasticbeanstalk/deployment/app_version_manifest.json') // eslint-disable-line
return Object.keys(RuntimeSources['stacker.news'])[0]
}
: undefined,
// Use the CDN in production and localhost for development. // Use the CDN in production and localhost for development.
assetPrefix: isProd ? 'https://a.stacker.news' : undefined, assetPrefix: isProd ? 'https://a.stacker.news' : undefined,
async headers () { async headers () {