Skip to content

Support Class and decorator #1028

@YuunYang

Description

@YuunYang

Subject of the feature

Support writing decorator and class in MDX file

Problem

Now, if I want to write class or decorator in mdx file, it will report an error. maybe we need add a feature to enable those grammar

Like if I write a class in mdx file it will throw an error from '@mdx-js/loader/index.js':
Support for the experimental syntax 'classProperties' isn't currently enabled,

It is actually not a bug in mdx, but a problem caused by lack of babel-loader plugin, I have tried to add those plugins in mdx/mdx-hast-to-jsx.js, solved those errors but caused another error -.-
image

Expected behavior

Now, the mdx seems not support class declaration and other experimental syntax, So I want mdx to support more experimental

Alternatives

No alternatives

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions