From 0c1d94a2c7a655f312d2449592c923cfbba8e9a2 Mon Sep 17 00:00:00 2001 From: Pooya Parsa Date: Fri, 28 Sep 2018 19:53:25 +0330 Subject: [PATCH] fix(cli): apply default value for NODE_ENV environment variable (#4003) --- bin/nuxt-build | 2 ++ bin/nuxt-dev | 2 ++ bin/nuxt-generate | 2 ++ bin/nuxt-start | 2 ++ 4 files changed, 8 insertions(+) diff --git a/bin/nuxt-build b/bin/nuxt-build index d9f1d9e68d..a920b8d937 100755 --- a/bin/nuxt-build +++ b/bin/nuxt-build @@ -1,4 +1,6 @@ #!/usr/bin/env node +process.env.NODE_ENV = process.env.NODE_ENV || 'production' + const parseArgs = require('minimist') const consola = require('consola') const { Nuxt, Builder, Generator } = require('..') diff --git a/bin/nuxt-dev b/bin/nuxt-dev index 0315a98222..9c2bb5f4dc 100755 --- a/bin/nuxt-dev +++ b/bin/nuxt-dev @@ -1,4 +1,6 @@ #!/usr/bin/env node +process.env.NODE_ENV = process.env.NODE_ENV || 'development' + const parseArgs = require('minimist') const consola = require('consola') const { version } = require('../package.json') diff --git a/bin/nuxt-generate b/bin/nuxt-generate index 23aa9802c8..108b079dbb 100755 --- a/bin/nuxt-generate +++ b/bin/nuxt-generate @@ -1,4 +1,6 @@ #!/usr/bin/env node +process.env.NODE_ENV = process.env.NODE_ENV || 'production' + const parseArgs = require('minimist') const consola = require('consola') const { Nuxt, Builder, Generator } = require('..') diff --git a/bin/nuxt-start b/bin/nuxt-start index 3ccb0dac93..0116520dab 100755 --- a/bin/nuxt-start +++ b/bin/nuxt-start @@ -1,4 +1,6 @@ #!/usr/bin/env node +process.env.NODE_ENV = process.env.NODE_ENV || 'production' + const fs = require('fs') const { resolve } = require('path') const parseArgs = require('minimist')