Skip to content

Commit a389f11

Browse files
committed
Updated prebuild.mjs
1 parent 6708cee commit a389f11

1 file changed

Lines changed: 1 addition & 3 deletions

File tree

‎scripts/prebuild.mjs‎

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,9 +32,7 @@ const { stdout = '' } = spawnSync('npx', ['next -v'], {
3232
encoding: 'utf8',
3333
});
3434

35-
const versionRegex = /\s+(?<version>[v\d\.]+)/i;
36-
const match = versionRegex.exec(stdout);
37-
const nextJsVersion = match?.groups?.version ?? 'Unknown';
35+
const nextJsVersion = stdout.split(/\s/)[-1] ?? 'Unknown';
3836

3937
const envContent = `
4038
NEXT_PUBLIC_BUILD_DATETIME="${buildDate} ${buildTime}"

0 commit comments

Comments
 (0)