mirror of https://github.com/lukechilds/rollup.git
Rich Harris
9 years ago
8 changed files with 34 additions and 4 deletions
@ -0,0 +1,4 @@ |
|||||
|
module.exports = { |
||||
|
skip: true, |
||||
|
description: 'side-effects are preserved if subject is exported in multiple ways, even if default export has no direct link to original (#733)' |
||||
|
}; |
@ -0,0 +1,6 @@ |
|||||
|
import { X } from './x.js'; |
||||
|
|
||||
|
X.prototype.bar = function () { |
||||
|
this.didBar = true; |
||||
|
return this; |
||||
|
}; |
@ -0,0 +1,8 @@ |
|||||
|
export function X () {} |
||||
|
|
||||
|
X.prototype.foo = function () { |
||||
|
this.didFoo = true; |
||||
|
return this; |
||||
|
}; |
||||
|
|
||||
|
export default ( false || X ); |
@ -0,0 +1,6 @@ |
|||||
|
import { x } from './x.js'; |
||||
|
import './bar.js'; |
||||
|
|
||||
|
var result = x().foo().bar(); |
||||
|
assert.ok( result.didFoo ); |
||||
|
assert.ok( result.didBar ); |
@ -0,0 +1,6 @@ |
|||||
|
export { default as X } from './foo.js'; |
||||
|
import { X } from './foo.js'; |
||||
|
|
||||
|
export function x () { |
||||
|
return new X(); |
||||
|
} |
Loading…
Reference in new issue