mirror of https://github.com/lukechilds/rollup.git
4 changed files with 38 additions and 65 deletions
@ -1,15 +0,0 @@ |
|||
const FOO = {}; |
|||
|
|||
module.exports = { |
|||
description: 'allows resolveId to return a non-string', |
|||
options: { |
|||
plugins: [{ |
|||
resolveId: importee => { |
|||
if ( importee === 'foo' ) return FOO; |
|||
}, |
|||
load: id => { |
|||
if ( id === FOO ) return 'export default 42'; |
|||
} |
|||
}] |
|||
} |
|||
}; |
@ -1,2 +0,0 @@ |
|||
import foo from 'foo'; |
|||
assert.equal( foo, 42 ); |
Loading…
Reference in new issue