提交 8af767b5 编写于 作者: A Anderson Leite 提交者: Tim Neutkens

Refactor readBuildId. (#5720)

上级 c870d03a
......@@ -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()
}
}
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册