From 264c543aaf45df8c81c50ea47cef6bbc4016a7f0 Mon Sep 17 00:00:00 2001 From: Max Ma Date: Fri, 19 Oct 2018 21:42:01 +0800 Subject: [PATCH] feat(builder): backport --no-generate option for spa build to 1.x versions (#4127) * feat(builder): add --no-generate option for SPA mode with v1.x version * update upath to 1.1.0 * update to puppeteer@1.9.0 --- bin/nuxt-build | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/bin/nuxt-build b/bin/nuxt-build index 552d2a463b..04df6bb499 100755 --- a/bin/nuxt-build +++ b/bin/nuxt-build @@ -33,6 +33,7 @@ if (argv.help) { --analyze, -a Launch webpack-bundle-analyzer to optimize your bundles. --spa Launch in SPA mode --universal Launch in Universal mode (default) + --no-generate Don't generate static version for SPA mode (useful for nuxt start) --config-file, -c Path to Nuxt.js config file (default: nuxt.config.js) --help, -h Displays this message `) @@ -65,8 +66,8 @@ const close = () => { process.exit(0) } -if (options.mode !== 'spa') { - // -- Build for SSR app -- +if (options.mode !== 'spa' || argv.generate === false) { + // -- Build Only -- builder .build() .then(() => debug('Building done'))