Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

@babel/plugin-proposal-decorators decoratorsBeforeExport option does not work #9964

Closed
Arichy opened this issue May 10, 2019 · 3 comments
Closed
Labels
awaiting reply i: bug outdated A closed issue/PR that is archived due to age. Recommended to make a new issue

Comments

@Arichy
Copy link

Arichy commented May 10, 2019

Bug Report

Current Behavior
I'm using create-react-app and @babel/plugin-proposal-decorators, and I want to write decorators before export keyword , so I add "decoratorsBeforeExport":true to .babelrc, but it throw an error.

Babel Configuration (.babelrc, package.json, cli command)

{
    "presets": [
        "react-app"
    ],
    "plugins": [
        [
            "@babel/plugin-proposal-decorators",
            {
                "decoratorsBeforeExport": true
            }
        ]
    ]
}

Environment

  • Babel version(s): 7.x.x

  • Node/npm version: node v11.13.0

  • OS: OSX 10.14.4

  • How you are using Babel: create-react-app

Additional context/Screenshots
image

@babel-bot
Copy link
Collaborator

Hey @Arichy! 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.

@nicolo-ribaudo
Copy link
Member

The official decorator proposals doesn't allow decorators before exports anymore.

Anyway, that option should still work in Babel. For some reasons that config files isn't being picked up, I think. Could you try using babel.config.js instad of .babelrc?

@GriffinCooksApps
Copy link

Removing this feature basically ruins decorators :(

@lock lock bot added the outdated A closed issue/PR that is archived due to age. Recommended to make a new issue label Nov 30, 2019
@lock lock bot locked as resolved and limited conversation to collaborators Nov 30, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
awaiting reply i: bug outdated A closed issue/PR that is archived due to age. Recommended to make a new issue
Projects
None yet
Development

No branches or pull requests

3 participants