when parcel compile my code it build js file started like this :
"use strict";
// modules are defined as an array
// [ module function, map of requires ]
//
// map of requires is short require name -> numeric require
//
// anything defined in a previous bundle is accessed via the
// orig method which is the require for previous bundles
require = function (_require) {
function require(_x, _x2, _x3) {
return _require.apply(this, arguments);
}
require.toString = function () {
return _require.toString();
};
return require;
}(function (modules, cache, entry) {
...
that code can't run because it try to define variable require
without var|let|const
in "use strict" mode .
So my qustion is : why it generate bad code like that ?