fix(nuxt-start): build detection

spa builds has no ssr json file
This commit is contained in:
Pooya Parsa 2017-08-05 16:15:31 +04:30
parent ad4c865957
commit 60b28e887f

View File

@ -61,7 +61,7 @@ options.dev = false
// Check if project is built for production
const distDir = join(options.rootDir, options.buildDir || '.nuxt', 'dist')
if (!fs.existsSync(join(distDir, 'server-bundle.json'))) {
if (!fs.existsSync(distDir)) {
console.error('> No build files found, please run `nuxt build` before launching `nuxt start`') // eslint-disable-line no-console
process.exit(1)
}