asapach / babel-plugin-rewire-exports

Babel plugin for stubbing [ES6, ES2015] module exports
MIT License
66 stars 7 forks source link

Enabled generating `rewire` stub for named constant exports #16

Closed sergei-startsev closed 5 years ago

sergei-startsev commented 5 years ago

At the moment named constant exports are just ignored:

export const foo = 'bar';

No rewire stubs are added for this export, so if you try import rewire$foo in your test, you get import is not defined error that is unexpected for plugin consumers.

The PR adds rewire stubs for named constant export . The generated stub function point out to the existing limitations.

sergei-startsev commented 5 years ago

Closed in favor of #17