I want to remove the global 'use strict' that babel-preset-env adds with babel 6.x.
I read the other post about es2015.
I've tried the following .babelrc configuration, to no avail:
{
"presets": [["env", {"loose":true}]],
"plugins": [
["transform-es2015-modules-commonjs", {
"strict" : false
}]
]
}
I do not want to edit the actual file in node_modules as the other post suggested for es2015. That's quite a hack and won't persist.
The only solution so far is to use gulp-iife to wrap every file. Is there really no way to pass an option in my .babelrc file to disable this?
Which plugin in 'env' is even doing this?
Thanks
Set the
modules
option of theenv
preset tofalse
:From babel documentation: