disable minify on build generate

This commit is contained in:
Pooya Parsa 2017-08-18 17:36:46 +04:30
parent d589bc5819
commit 2c1473c233

View File

@ -74,8 +74,10 @@ builder.build()
.then(() => { .then(() => {
debug('Building done') debug('Building done')
if (options.mode === 'spa') { if (options.mode === 'spa') {
// Generate on spa mode // Disable minify to get exact results of nuxt start
return new Generator(nuxt, builder).generate({ build: false }).then(() => { nuxt.options.generate.minify = false
// Generate on SPA mode
return new Generator(nuxt, builder).generate({ build: false, minify: false }).then(() => {
if (!nuxt.options.dev) { if (!nuxt.options.dev) {
// eslint-disable-next-line no-console // eslint-disable-next-line no-console
console.log(`✓ You can now directly upload ${nuxt.options.generate.dir}/ or start server using "nuxt start"`) console.log(`✓ You can now directly upload ${nuxt.options.generate.dir}/ or start server using "nuxt start"`)