You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If a file only contains type imports or exports, Babel seems to assume the source type is script. Consequently, a value import inserted by a plugin (babel-plugin-flow-runtime) never gets transpiled by plugin-transform-modules-commonjs.
I'm not sure if this is intentional or fixable or not? I know sourceType: 'unambiguous' is probably governed by a grammar spec that doesn't deal with type imports or exports. But maybe the unexpected issue I'm running into with this is worth thinking about.
Hey @jedwards1211! We really appreciate you taking the time to report an issue. The collaborators on this project attempt to help as many people as possible, but we're a limited number of volunteers, so it's possible this won't be addressed swiftly.
If you need any help, or just have general Babel or JavaScript questions, we have a vibrant Slack community that typically always has someone willing to help. You can sign-up here for an invite."
Bug Report
Current behavior
A clear and concise description of the behavior.
If a file only contains type imports or exports, Babel seems to assume the source type is script. Consequently, a value import inserted by a plugin (
babel-plugin-flow-runtime
) never gets transpiled byplugin-transform-modules-commonjs
.gajus/flow-runtime#242
I'm not sure if this is intentional or fixable or not? I know
sourceType: 'unambiguous'
is probably governed by a grammar spec that doesn't deal with type imports or exports. But maybe the unexpected issue I'm running into with this is worth thinking about.Input Code
Expected behavior
A clear and concise description of what you expected to happen (or code).
import
statements inserted by plugins get transpiled byplugin-transform-modules-commonjs
.Babel Configuration (babel.config.js, .babelrc, package.json#babel, cli command, .eslintrc)
babel.config.js
Environment
The text was updated successfully, but these errors were encountered: