@ babel / plugin-proposal-class-properties不起作用

时间:2019-12-20 12:53:50

标签: webpack babeljs babel-loader

即使在babelrc中包含@ babel / plugin-proposal-class-properties之后,也不会对类组件进行编译。

{
    "presets": [
        [
            "@babel/preset-env",
            {
                "modules": false
            }
        ]
    ],
    "plugins": [
        "@babel/plugin-transform-property-literals",
        "@babel/plugin-transform-member-expression-literals",
        "@babel/plugin-proposal-object-rest-spread",
        "@babel/plugin-transform-object-assign",
        "array-includes",
        "@babel/plugin-proposal-class-properties"
        // "@babel/plugin-transform-classes"
    ]
}

0 个答案:

没有答案