mirror of https://github.com/lukechilds/rollup.git
9 changed files with 67 additions and 1 deletions
@ -0,0 +1,6 @@ |
|||||
|
module.exports = { |
||||
|
description: 'ignores side-effects outside entry module in aggressive mode', |
||||
|
options: { |
||||
|
aggressive: true |
||||
|
} |
||||
|
} |
@ -0,0 +1,9 @@ |
|||||
|
define(function () { 'use strict'; |
||||
|
|
||||
|
function foo () { |
||||
|
return 42; |
||||
|
} |
||||
|
|
||||
|
assert.equal( foo(), 42 ); |
||||
|
|
||||
|
}); |
@ -0,0 +1,7 @@ |
|||||
|
'use strict'; |
||||
|
|
||||
|
function foo () { |
||||
|
return 42; |
||||
|
} |
||||
|
|
||||
|
assert.equal( foo(), 42 ); |
@ -0,0 +1,5 @@ |
|||||
|
function foo () { |
||||
|
return 42; |
||||
|
} |
||||
|
|
||||
|
assert.equal( foo(), 42 ); |
@ -0,0 +1,9 @@ |
|||||
|
(function () { 'use strict'; |
||||
|
|
||||
|
function foo () { |
||||
|
return 42; |
||||
|
} |
||||
|
|
||||
|
assert.equal( foo(), 42 ); |
||||
|
|
||||
|
})(); |
@ -0,0 +1,13 @@ |
|||||
|
(function (global, factory) { |
||||
|
typeof exports === 'object' && typeof module !== 'undefined' ? factory() : |
||||
|
typeof define === 'function' && define.amd ? define(factory) : |
||||
|
factory(); |
||||
|
}(this, function () { 'use strict'; |
||||
|
|
||||
|
function foo () { |
||||
|
return 42; |
||||
|
} |
||||
|
|
||||
|
assert.equal( foo(), 42 ); |
||||
|
|
||||
|
})); |
@ -0,0 +1,9 @@ |
|||||
|
function x () { |
||||
|
console.log( 'side-effect' ); |
||||
|
} |
||||
|
|
||||
|
x(); |
||||
|
|
||||
|
export function foo () { |
||||
|
return 42; |
||||
|
} |
@ -0,0 +1,3 @@ |
|||||
|
import { foo } from './foo'; |
||||
|
|
||||
|
assert.equal( foo(), 42 ); |
Loading…
Reference in new issue