How to set up Babel 6 stage 0 with React and Webpack

前端 未结 6 2026
抹茶落季
抹茶落季 2020-12-23 19:11

My understanding from the docs

I see that Babel 6 has three presets for now: es2015, react and stage-x. I read that I can set those in .babelrc like s

6条回答
  •  礼貌的吻别
    2020-12-23 20:01

    Have you tried?:

    presets: [{
        plugins: [
            'transform-class-properties'
        ]
    }, 'stage-0', 'es2015', 'react']
    

提交回复
热议问题