Babel plugin for stubbing [ES6, ES2015] module exports
fixed #28
fixed #25 and refactored variable declarations in named exports
Improved support for typescript
Potential breaking change: functions are now converted into a function expression and exported variable by the same name. Example:
export default function foo() {
return null;
}
Becomes:
var foo = function foo() {
return null;
};
export { foo as default };
And for named exports:
export function foo() {
return null;
}
Becomes:
var foo = function foo() {
return null;
};
export { foo };
Changed the way constant exports are handled by default:
export const foo = 'bar'
) were ignored by default. While default constant exports (e.g. export default foo
) were treated similar to other immutable values like literals, globals and imports.unsafeConst
option is used.Thanks to @sergei-startsev for most of the work.
unsafeConst
option should now allow to modify constant bindings inside the module, #15
fixed #13
The latest
version now targets Babel v7.
If you're still on Babel v6, keep using 0.x
releases.
added support for destructured exports, fixes #10
added unsafeConst
option