Babel 6 react JSX transformer - disable strict

后端 未结 2 648
甜味超标
甜味超标 2021-01-04 02:45

Issue

I\'m using babel 6 for react JSX transforms. However I\'m not using the react preset, I am ONLY using the \'transform-react-jsx\' plugin (and trying strict-m

2条回答
  •  再見小時候
    2021-01-04 03:12

    According to this line, the strictMode option is indeed parsed.

    I don't understand the syntax you used for your .babelrc, though. Why an array?

    Try this:

    {
      "plugins": [
        ["transform-react-jsx"]
      ],
      "sourceMaps": true,
      "strictMode": false
    }
    

提交回复
热议问题