Skip to content

Babel cannot parse decorators #83

@lazarljubenovic

Description

@lazarljubenovic

We're getting the following error on our codebase.

Babel couldn't parse file in @webdoc/parser (libs/...component.ts)
C:\...\nvm\v15.4.0\node_modules\@webdoc\cli\node_modules\@babel\parser\lib\index.js:748
    const err = new SyntaxError(message);
                ^
SyntaxError: This experimental syntax requires enabling one of the following parser plugin(s): 'decorators-legacy, decorators' (11:0)

Obviously, the babel parser is missing the decorators and/or decorators-legacy plugin, but I can't figure out how to influence the used babel plugins.

I've checked out source code for @webdoc/parser and saw the babel config file.

"presets": [ "@webdoc/babel-preset" ]

But I don't see any way to influence this, so I'm not sure if this issue is a simple question or missing docs or missing feature 😄

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions