Created
April 24, 2024 07:14
-
-
Save fi3ework/5006ab48c4b6338fbd91f433f35e5ff6 to your computer and use it in GitHub Desktop.
remove single inlined module IIFE wrapper
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/******/ (() => { // webpackBootstrap | |
/******/ var __webpack_modules__ = ([ | |
/* 0 */ | |
/*!********************************************!*\ | |
!*** ./entry-inline/no-var-leak/module.js ***! | |
\********************************************/ | |
/*! unknown exports (runtime-defined) */ | |
/*! runtime requirements: module */ | |
/*! CommonJS bailout: module.exports is used directly at 1:0-14 */ | |
/*! Statement (ExpressionStatement) with side effects in source code at 1:0-33 */ | |
/***/ ((module) => { | |
module.exports = typeof localVar; | |
/***/ }) | |
/******/ ]); | |
/************************************************************************/ | |
/******/ // The module cache | |
/******/ var __webpack_module_cache__ = {}; | |
/******/ | |
/******/ // The require function | |
/******/ function __webpack_require__(moduleId) { | |
/******/ // Check if module is in cache | |
/******/ var cachedModule = __webpack_module_cache__[moduleId]; | |
/******/ if (cachedModule !== undefined) { | |
/******/ return cachedModule.exports; | |
/******/ } | |
/******/ // Create a new module (and put it into the cache) | |
/******/ var module = __webpack_module_cache__[moduleId] = { | |
/******/ // no module.id needed | |
/******/ // no module.loaded needed | |
/******/ exports: {} | |
/******/ }; | |
/******/ | |
/******/ // Execute the module function | |
/******/ __webpack_modules__[moduleId](module, module.exports, __webpack_require__); | |
/******/ | |
/******/ // Return the exports of the module | |
/******/ return module.exports; | |
/******/ } | |
/******/ | |
/************************************************************************/ | |
var __webpack_exports__ = {}; | |
/*!*******************************************!*\ | |
!*** ./entry-inline/no-var-leak/index.js ***! | |
\*******************************************/ | |
/*! unknown exports (runtime-defined) */ | |
/*! runtime requirements: __webpack_require__ */ | |
/*! Statement (ExpressionStatement) with side effects in source code at 3:0-6:3 */ | |
var no_var_leak_localVar = 42; | |
it("should not leak localVar to other modules", () => { | |
expect(no_var_leak_localVar).toBe(42); | |
expect(__webpack_require__(/*! ./module */ 0)).toBe("undefined"); | |
}); | |
/******/ })() | |
; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment