File tree 2 files changed +12
-0
lines changed
2 files changed +12
-0
lines changed Original file line number Diff line number Diff line change 1
1
import NextBundleAnalyzer from '@next/bundle-analyzer' ;
2
2
import buildDynamics from './scripts/build-dynamics.mjs' ;
3
+ import generateBuildId from './scripts/generate-build-id.mjs' ;
3
4
4
5
buildDynamics ( ) ;
5
6
@@ -55,6 +56,7 @@ const withBundleAnalyzer = NextBundleAnalyzer({
55
56
56
57
export default withBundleAnalyzer ( {
57
58
basePath,
59
+ generateBuildId,
58
60
eslint : {
59
61
ignoreDuringBuilds : true ,
60
62
} ,
Original file line number Diff line number Diff line change
1
+ import buildInfo from '../build-info.json' assert { type : 'json ' } ;
2
+
3
+ export default function generateBuildId ( ) {
4
+ const commit = buildInfo . commit ;
5
+ const buildId = commit === 'REPLACE_WITH_COMMIT' ? null : commit ;
6
+ console . info (
7
+ buildId ? `Generated build id: ${ buildId } ` : 'Fallback to default build ID' ,
8
+ ) ;
9
+ return buildId ;
10
+ }
You can’t perform that action at this time.
0 commit comments