Skip to content

Commit

Permalink
Remove buildId generation.
Browse files Browse the repository at this point in the history
  • Loading branch information
arunoda committed Mar 3, 2017
1 parent e1d2ad0 commit fdd36a5
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 8 deletions.
2 changes: 1 addition & 1 deletion bin/next-start
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
Expand Down
7 changes: 0 additions & 7 deletions server/build/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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')
}

0 comments on commit fdd36a5

Please sign in to comment.