mirror of
https://github.com/terribleplan/next.js.git
synced 2024-01-19 02:48:18 +00:00
Refactor readBuildId. (#5720)
This commit is contained in:
parent
c870d03aa0
commit
8af767b52d
|
@ -256,8 +256,6 @@ export default class Server {
|
|||
if (!fs.existsSync(resolve(this.distDir, BUILD_ID_FILE))) {
|
||||
throw new Error(`Could not find a valid build in the '${this.distDir}' directory! Try building your app with 'next build' before starting the server.`)
|
||||
}
|
||||
const buildIdPath = join(this.distDir, BUILD_ID_FILE)
|
||||
const buildId = fs.readFileSync(buildIdPath, 'utf8')
|
||||
return buildId.trim()
|
||||
return fs.readFileSync(join(this.distDir, BUILD_ID_FILE), 'utf8').trim()
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue