Skip to content

Commit

Permalink
set process.env.ROLLUP_WATCH before loading config file
Browse files Browse the repository at this point in the history
  • Loading branch information
Rich-Harris committed Aug 17, 2017
1 parent 9cfada0 commit dc6cd87
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion bin/src/run/index.js
Expand Up @@ -64,6 +64,8 @@ export default function runRollup ( command ) {
configFile = realpathSync( configFile );
}

if (command.watch) process.env.ROLLUP_WATCH = 'true';

loadConfigFile(configFile, command.silent)
.then(normalized => execute( configFile, normalized, command ))
.catch(handleError);
Expand All @@ -74,7 +76,6 @@ export default function runRollup ( command ) {

function execute ( configFile, configs, command ) {
if ( command.watch ) {
process.env.ROLLUP_WATCH = 'true';
watch( configFile, configs, command, command.silent );
} else {
return sequence( configs, config => {
Expand Down

0 comments on commit dc6cd87

Please sign in to comment.