mirror of https://github.com/lukechilds/rollup.git
Rich Harris
9 years ago
4 changed files with 29 additions and 1 deletions
@ -0,0 +1,17 @@ |
|||
var assert = require( 'assert' ); |
|||
|
|||
module.exports = { |
|||
description: 'reports which file caused a transform error', |
|||
options: { |
|||
plugins: [{ |
|||
transform: function ( code, id ) { |
|||
if ( /foo/.test( id ) ) { |
|||
throw new Error( 'nope' ); |
|||
} |
|||
} |
|||
}] |
|||
}, |
|||
error: function ( err ) { |
|||
assert.ok( ~err.message.indexOf( 'foo.js' ) ); |
|||
} |
|||
}; |
@ -0,0 +1,3 @@ |
|||
export default function () { |
|||
console.log( 'foo' ); |
|||
} |
@ -0,0 +1,3 @@ |
|||
import foo from './foo.js'; |
|||
|
|||
foo(); |
Loading…
Reference in new issue