@@ -42,12 +42,16 @@ function handleOptions(options) {
4242 flow = true
4343 }
4444
45- return { targets, keepModules, addModuleExports, addModuleExportsDefaultProperty, sourceMap, react, flow }
45+ if ( removeAllUseStrict == null ) {
46+ removeAllUseStrict = false
47+ }
48+
49+ return { targets, keepModules, addModuleExports, addModuleExportsDefaultProperty, sourceMap, react, flow, removeAllUseStrict }
4650}
4751
4852module . exports = ( api , options , dirname ) => {
4953
50- const { targets, keepModules, addModuleExports, addModuleExportsDefaultProperty, sourceMap, react, flow } = handleOptions ( options )
54+ const { targets, keepModules, addModuleExports, addModuleExportsDefaultProperty, sourceMap, react, flow, removeAllUseStrict } = handleOptions ( options )
5155
5256 let presets = [
5357 [
@@ -94,6 +98,9 @@ module.exports = (api, options, dirname) => {
9498 // compile time code generation
9599 require ( "babel-plugin-codegen" ) ,
96100 require ( "babel-plugin-preval" ) ,
101+
102+ // not strict
103+ [ require ( "babel-plugin-transform-not-strict" ) , { removeAll : removeAllUseStrict } ] ,
97104 ] ;
98105
99106 // transform modules (e.g when without Rollup)
0 commit comments