mirror of https://github.com/lukechilds/rollup.git
Rich Harris
9 years ago
5 changed files with 27 additions and 0 deletions
@ -0,0 +1,3 @@ |
|||||
|
module.exports = { |
||||
|
description: 'side-effects are preserved if subject is exported in multiple ways (#733)' |
||||
|
}; |
@ -0,0 +1,6 @@ |
|||||
|
import { X } from './x.js'; // import X works
|
||||
|
|
||||
|
X.prototype.bar = function () { |
||||
|
console.log( 'bar' ); |
||||
|
return this; |
||||
|
}; |
@ -0,0 +1,8 @@ |
|||||
|
export function X () {} |
||||
|
|
||||
|
X.prototype.foo = function () { |
||||
|
console.log( 'foo' ); |
||||
|
return this; |
||||
|
}; |
||||
|
|
||||
|
export default X; // export {X as Y} with corresponding export {Y as X} in x.js works
|
@ -0,0 +1,4 @@ |
|||||
|
import { x } from './x.js'; |
||||
|
import './bar.js'; |
||||
|
|
||||
|
x().foo().bar(); |
@ -0,0 +1,6 @@ |
|||||
|
export { default as X } from './foo.js'; // export {X} works
|
||||
|
import { X } from './foo.js'; // import X works
|
||||
|
|
||||
|
export function x () { |
||||
|
return new X(); |
||||
|
} |
Loading…
Reference in new issue