Babel 6 transform-runtime: $export is not a function

前端 未结 7 1071
一向
一向 2020-12-14 05:52

I\'m trying to incorporate Babel\'s transform-runtime to make my code compatible with IE9. But since integrating it, the code won\'t even run on Chrome. I get the error

7条回答
  •  温柔的废话
    2020-12-14 06:24

    You can try replace "exclude" by "include", following the recomendations from documentation.

    Try to prefer "include" when possible...

    This worked for me.

    {
      "test": /\.js/,
      "loader": "babel",
      "include": [path.resolve(__dirname, './src')]
    }
    

提交回复
热议问题