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
There's now a babel plugin that you can add to your config that will remove strict mode: babel-plugin-transform-remove-strict-mode
. It's a little ugly in that the "use strict"
gets added and then removed, but it makes the config much nicer.
Docs are in the GitHub repo: https://github.com/genify/babel-plugin-transform-remove-strict-mode
Your .babelrc ends up looking like this:
{
"presets": ["env"],
"plugins": ["transform-remove-strict-mode"]
}