From 8c732d8a9f55e47eca3b91bfbac1bfb45eeadc30 Mon Sep 17 00:00:00 2001 From: RobertPurcea Date: Mon, 17 Sep 2018 17:58:26 +0300 Subject: [PATCH] fixed watch not working when NODE_ENV is production --- src/cli.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/cli.js b/src/cli.js index 837efdf8728..4e2ff4ce825 100755 --- a/src/cli.js +++ b/src/cli.js @@ -188,6 +188,10 @@ async function bundle(main, command) { // Require bundler here so the help command is fast const Bundler = require('../'); + if (command.name() === 'watch') { + command.watch = true; + } + if (command.name() === 'build') { command.production = true; process.env.NODE_ENV = process.env.NODE_ENV || 'production';