mirror of https://github.com/lukechilds/rollup.git
Rich-Harris
10 years ago
4 changed files with 31 additions and 1 deletions
@ -0,0 +1,11 @@ |
|||||
|
var assert = require( 'assert' ); |
||||
|
|
||||
|
module.exports = { |
||||
|
description: 'allows export and import reference to share name', |
||||
|
exports: function ( exports ) { |
||||
|
assert.equal( exports.b, 9 ); |
||||
|
}, |
||||
|
solo: true |
||||
|
}; |
||||
|
|
||||
|
// adapted from es6-module-transpiler
|
@ -0,0 +1,2 @@ |
|||||
|
export var a = 1; |
||||
|
assert.equal(a, 1); |
@ -0,0 +1,13 @@ |
|||||
|
import { a } from './foo'; |
||||
|
|
||||
|
// This variable declaration is going to be altered because `b` needs to be
|
||||
|
// re-written. We need to make sure that the `a` re-writing and the unaffected
|
||||
|
// `c` declarator are not being clobbered by that alteration.
|
||||
|
var a_ = a, b = 9, c = 'c'; |
||||
|
|
||||
|
assert.equal(a, 1); |
||||
|
assert.equal(a_, 1); |
||||
|
assert.equal(b, 9); |
||||
|
assert.equal(c, 'c'); |
||||
|
|
||||
|
export { b }; |
Loading…
Reference in new issue