mirror of https://github.com/lukechilds/rollup.git
9 changed files with 58 additions and 1 deletions
@ -0,0 +1,3 @@ |
|||||
|
module.exports = { |
||||
|
description: 'treeshakes async functions (#492)' |
||||
|
}; |
@ -0,0 +1,9 @@ |
|||||
|
define(function () { 'use strict'; |
||||
|
|
||||
|
async function foo () { |
||||
|
return 'foo'; |
||||
|
} |
||||
|
|
||||
|
foo().then( value => console.log( value ) ); |
||||
|
|
||||
|
}); |
@ -0,0 +1,7 @@ |
|||||
|
'use strict'; |
||||
|
|
||||
|
async function foo () { |
||||
|
return 'foo'; |
||||
|
} |
||||
|
|
||||
|
foo().then( value => console.log( value ) ); |
@ -0,0 +1,5 @@ |
|||||
|
async function foo () { |
||||
|
return 'foo'; |
||||
|
} |
||||
|
|
||||
|
foo().then( value => console.log( value ) ); |
@ -0,0 +1,10 @@ |
|||||
|
(function () { |
||||
|
'use strict'; |
||||
|
|
||||
|
async function foo () { |
||||
|
return 'foo'; |
||||
|
} |
||||
|
|
||||
|
foo().then( value => console.log( value ) ); |
||||
|
|
||||
|
}()); |
@ -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'; |
||||
|
|
||||
|
async function foo () { |
||||
|
return 'foo'; |
||||
|
} |
||||
|
|
||||
|
foo().then( value => console.log( value ) ); |
||||
|
|
||||
|
}))); |
@ -0,0 +1,3 @@ |
|||||
|
import { foo } from './utils.js'; |
||||
|
|
||||
|
foo().then( value => console.log( value ) ); |
@ -0,0 +1,7 @@ |
|||||
|
export async function foo () { |
||||
|
return 'foo'; |
||||
|
} |
||||
|
|
||||
|
export async function bar () { |
||||
|
return 'bar'; |
||||
|
} |
Loading…
Reference in new issue