Почему Webpack использует eval с eval-source-map? - PullRequest
0 голосов
/ 17 июня 2020

Я смотрю на сгенерированный код и вижу повсюду использование eval, но особо не задумывался об этом. Почему они это делают? Нет другого решения? Я хотел бы знать, что за этим стоит.

__webpack_require__){eval("/* WEBPACK VAR INJECTION */(function(global
 module) {var __WEBPACK_AMD_DEFINE_RESULT__;/**
  * @license
  * Lodash <https://lodash.com/>
  * Copyright OpenJS Foundation and other contributors <https://openjsf.org/>
  * Released under MIT license <https://lodash.com/license>
  * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
  * Copyright Jeremy Ashkenas
 DocumentCloud and Investigative Reporters & Editors
  */
  ;(function() {

   /** Used as a safe reference for `undefined` in pre-ES5 environments. */
   var undefined;

   /** Used as the semantic version number. */
   var VERSION = '4.17.15';

   /** Used as the size to enable large array optimizations. */
   var LARGE_ARRAY_SIZE = 200;

   /** Error message constants. */
   var CORE_ERROR_TEXT = 'Unsupported core-js use. Try https://npms.io/search?q=ponyfill.'

      FUNC_ERROR_TEXT = 'Expected a function';

  /** Used to stand-in for `undefined` hash values. */
  var HASH_UNDEFINED = '__lodash_hash_undefined__';

  /** Used as the maximum memoize cache size. */
  var MAX_MEMOIZE_SIZE = 500;

  /** Used as the internal argument placeholder. */
  var PLACEHOLDER = '__lodash_placeholder__';

  /** Used to compose bitmasks for cloning. */
  var CLONE_DEEP_FLAG = 1

      CLONE_FLAT_FLAG = 2

      CLONE_SYMBOLS_FLAG = 4;

  /** Used to compose bitmasks for value comparisons. */
  var COMPARE_PARTIAL_FLAG = 1
...