From fdd36a5a0a307becdbd1d85ae3881b3a15b03d26 Mon Sep 17 00:00:00 2001 From: Arunoda Susiripala Date: Fri, 3 Mar 2017 11:59:05 +0530 Subject: [PATCH] Remove buildId generation. --- bin/next-start | 2 +- server/build/index.js | 7 ------- 2 files changed, 1 insertion(+), 8 deletions(-) diff --git a/bin/next-start b/bin/next-start index 854a11e9b2671..793f8bce822e3 100755 --- a/bin/next-start +++ b/bin/next-start @@ -48,7 +48,7 @@ const dir = resolve(argv._[0] || '.') const srv = new Server({ dir }) -if (!existsSync(resolve(dir, '.next', 'BUILD_ID'))) { +if (!existsSync(resolve(dir, '.next', 'build-stats.json'))) { console.error(`> Could not find a valid build in the '.next' directory! Try building your app with 'next build' before starting the server.`) process.exit(1) } diff --git a/server/build/index.js b/server/build/index.js index 0fcff294423b3..4f2f46a33b61b 100644 --- a/server/build/index.js +++ b/server/build/index.js @@ -13,7 +13,6 @@ export default async function build (dir) { try { const webpackStats = await runCompiler(compiler) await writeBuildStats(buildDir, webpackStats) - await writeBuildId(buildDir) } catch (err) { console.error(`> Failed to build on ${buildDir}`) throw err @@ -56,9 +55,3 @@ async function writeBuildStats (dir, webpackStats) { const buildStatsPath = join(dir, '.next', 'build-stats.json') await fs.writeFile(buildStatsPath, JSON.stringify(chunkHashMap), 'utf8') } - -async function writeBuildId (dir) { - const buildIdPath = join(dir, '.next', 'BUILD_ID') - const buildId = uuid.v4() - await fs.writeFile(buildIdPath, buildId, 'utf8') -}