Browse Source

throw if deprecated options are passed

better-aggressive
Rich-Harris 9 years ago
parent
commit
a474426d09
  1. 6
      src/Bundle.js
  2. 4
      src/rollup.js

6
src/Bundle.js

@ -34,9 +34,9 @@ export default class Bundle {
.concat( load )
);
this.transformers = ensureArray( options.transform ).concat(
this.plugins.map( plugin => plugin.transform ).filter( Boolean )
);
this.transformers = this.plugins
.map( plugin => plugin.transform )
.filter( Boolean );
this.pending = blank();
this.moduleById = blank();

4
src/rollup.js

@ -11,6 +11,10 @@ export function rollup ( options ) {
throw new Error( 'You must supply options.entry to rollup' );
}
if ( options.transform || options.load || options.resolveId || options.resolveExternal ) {
throw new Error( 'The `transform`, `load`, `resolveId` and `resolveExternal` options are deprecated in favour of a unified plugin API. See https://github.com/rollup/rollup/wiki/Plugins for details' );
}
const bundle = new Bundle( options );
return bundle.build().then( () => {

Loading…
Cancel
Save