-
-
Notifications
You must be signed in to change notification settings - Fork 5.8k
Closed
Labels
outdatedA closed issue/PR that is archived due to age. Recommended to make a new issueA closed issue/PR that is archived due to age. Recommended to make a new issue
Description
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
- REPL or Repo link if applicable:
https://runkit.com/lodin/decorators-transform-runtime-issue
@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.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
outdatedA closed issue/PR that is archived due to age. Recommended to make a new issueA closed issue/PR that is archived due to age. Recommended to make a new issue