How to remove global “use strict” added by babel

后端 未结 16 2270
不思量自难忘°
不思量自难忘° 2020-11-27 03:46

I\'m using function form of \"use strict\" and don\'t want global form which Babel adds after transpilation. The problem is I\'m using some libraries that aren\'t using \"us

16条回答
  •  醉梦人生
    2020-11-27 04:11

    Babel 6 + es2015

    We can disabled babel-plugin-transform-es2015-modules-commonjs to require babel-plugin-transform-strict-mode.

    So comment the following code in node_modules/babel-plugin-transform-es2015-modules-commonjs/lib/index.js at 151 line

    //inherits: require("babel-plugin-transform-strict-mode"),
    

提交回复
热议问题