How can webpack or js cancel the strict mode?

  javascript, question

Webpack packaging encountered a problem.

I used the function arguments.callee to package a js file with a webpack here, but the webpack uses strict mode packaging, so this js file has always reported errors. (this function is used in many places in this js file, so the function arguments.callee cannot be changed.)

So here’s how to do it
1. How to close the strict mode for js files
2. How to disable the strict mode when packaging a Web pack or disable the strict mode for a js file when packaging the js file

Should be caused by babel, the following are several ways to close strict mode, you can give it a try:

1. babel5

babel: {
 options: {
 blacklist: ["useStrict"],
 //   ...
 //   ...

2. babel6

Amendment. babelrc

Skip module:

 presets: [
 ["es2015", { "modules": false }]

Skipping a document:

 "presets": ["es2015"],
 "ignore": [

3. babel-plugin-transform-remove-strict-mode

Add this plug-in: …

Other references: … … …