mirror of https://github.com/lukechilds/rollup.git
Rich Harris
9 years ago
5 changed files with 26 additions and 5 deletions
@ -0,0 +1,10 @@ |
|||||
|
var assert = require( 'assert' ); |
||||
|
|
||||
|
module.exports = { |
||||
|
description: 'warns if default and named exports are used in auto mode', |
||||
|
warnings: function ( warnings ) { |
||||
|
assert.deepEqual( warnings, [ |
||||
|
'Using named and default exports together. Consumers of your bundle will have to use bundle[\'default\'] to access the default export, which may not be what you want. Use `exports: \'named\'` to disable this warning. See https://github.com/rollup/rollup/wiki/JavaScript-API#exports for more information' |
||||
|
]); |
||||
|
} |
||||
|
}; |
@ -0,0 +1,10 @@ |
|||||
|
function foo () { |
||||
|
console.log( 'foo' ); |
||||
|
} |
||||
|
|
||||
|
function bar () { |
||||
|
console.log( 'bar' ); |
||||
|
} |
||||
|
|
||||
|
export default foo; |
||||
|
export { bar }; |
Loading…
Reference in new issue