Skip to content

Commit

Permalink
fix rollup-watch (#887)
Browse files Browse the repository at this point in the history
  • Loading branch information
Rich-Harris committed Sep 1, 2016
1 parent 8dd88bf commit 3de4771
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions bin/src/runRollup.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { realpathSync } from 'fs';
import { rollup } from 'rollup';
import * as rollup from 'rollup';

This comment has been minimized.

Copy link
@TrySound

TrySound Sep 1, 2016

Member

And what's the difference?

This comment has been minimized.

Copy link
@Rich-Harris

Rich-Harris Sep 1, 2016

Author Contributor

Lower down, rollup gets passed to rollup-watch. In 0.34.11 it was passing the rollup function, not the namespace.

import relative from 'require-relative';
import handleError from './handleError';
import SOURCEMAPPING_URL from './sourceMappingUrl.js';
Expand Down Expand Up @@ -57,7 +57,7 @@ export default function runRollup ( command ) {
config = realpathSync( config );
}

rollup({
rollup.rollup({
entry: config,
onwarn: message => {
if ( /Treating .+ as external dependency/.test( message ) ) return;
Expand Down Expand Up @@ -216,7 +216,7 @@ function bundle ( options ) {
handleError({ code: 'MISSING_INPUT_OPTION' });
}

return rollup( options ).then( bundle => {
return rollup.rollup( options ).then( bundle => {
if ( options.dest ) {
return bundle.write( options );
}
Expand Down

0 comments on commit 3de4771

Please sign in to comment.