flowtype "declare var module" causes transform-flow-strip-types to transpile module to _module
Author: philiiiiiippCreated May 8, 2017Updated Sep 2, 2026
Labelshelp wantedarea: flow
Choose one: is this a bug report or feature request? bug report
When using flowtype's
declare var modulein a file which uses module.exports, transform-flow-strip-types produces
_module.exportsinstead of
module.exportsHere is the sample code to reproduce https://github.com/philiiiiiipp/modules_test
Babel Configuration (.babelrc, package.json, cli command)
"babel": {
"presets": [
"es2015",
"stage-2"
],
"plugins": [
"transform-flow-strip-types"
]
}| software | version(s) |
|---|---|
| Babel | 6.24.1 |
| node | v6.10.3 |
| npm | 4.2.0 |
| Operating System | OSX 10.11.6 |
Source: babel/babel