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"],
 //   ...
 },
 //   ...
 bracket

2. babel6

Amendment. babelrc

Skip module:

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

Skipping a document:

bracket
 "presets": ["es2015"],
 "ignore": [
 "./src/js/directive/datePicker.js"
 bracket
 bracket

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

Add this plug-in:https://www.npmjs.com/package …

Other references:

http://stackoverflow.com/ques …

http://babeljs.io/docs/plugin …

https://github.com/shanggqm/b …