Bug Report
Current Behavior
Decorator helpers are not imported if @babel/plugin-transform-runtime is enabled, instead, they are still defined in file as if no transform-runtime plugin is used.
Input Code
@cls
class A {
@prop
test() {}
}
Expected behavior/code
All helper functions in the file are replaced with imports from @babel/runtime.
Babel Configuration (.babelrc, package.json, cli command)
{
plugins: [
[require("@babel/plugin-proposal-decorators"), {decoratorsBeforeExport: true}],
require("@babel/plugin-proposal-class-properties"),
[require("@babel/plugin-transform-runtime"), {
"corejs": false,
"helpers": true,
"regenerator": false,
"useESModules": true
}],
],
presets: [],
}
Environment
- Babel version(s): 7.2.2
- Node/npm version: node 11.8.0/npm 6.5.0
- OS: Windows 10
- Monorepo: [e.g. yes/no/Lerna]: no
- How you are using Babel: [e.g.
cli, register, loader]: cli
Additional context/Screenshots
Add any other context about the problem here. If applicable, add screenshots to help explain.
I can find @babel/runtime/helpers/esm/decorate.js file in node_modules, so only import replacing doesn't work for some reason.
Bug Report
Current Behavior
Decorator helpers are not imported if
@babel/plugin-transform-runtimeis enabled, instead, they are still defined in file as if no transform-runtime plugin is used.Input Code
https://runkit.com/lodin/decorators-transform-runtime-issue
Expected behavior/code
All helper functions in the file are replaced with imports from
@babel/runtime.Babel Configuration (.babelrc, package.json, cli command)
Environment
cli,register,loader]: cliAdditional context/Screenshots
Add any other context about the problem here. If applicable, add screenshots to help explain.
I can find
@babel/runtime/helpers/esm/decorate.jsfile innode_modules, so only import replacing doesn't work for some reason.