Skip to content

ES6 modules go in...

main.js (entry module)
// NAMED EXPORTS
// There are many ways to export bindings
// from an ES2015 module
export var foo = 1;

export function bar() {
// try changing this to `foo++`
// when generating CommonJS
return foo;
}

function baz() {
return bar();
}

export * from './qux';
export { baz };
export const qux = 'QUX';

... bundle comes out

Loading Rollup...

output.format

Loading Rollup …

Released under the MIT License.