mirror of https://github.com/webpack/webpack.git
				
				
				
			| 
				
					
						
							 
				
	
				Github Actions / lint (push) Waiting to run
				
					Details
				
			 
		
			
				
	
				Github Actions / validate-legacy-node (push) Waiting to run
				
					Details
				
			 
		
			
				
	
				Github Actions / benchmark (push) Waiting to run
				
					Details
				
			 
		
			
				
	
				Github Actions / basic (push) Waiting to run
				
					Details
				
			 
		
			
				
	
				Github Actions / unit (push) Waiting to run
				
					Details
				
			 
		
			
				
	
				Github Actions / integration (10.x, macos-latest, a) (push) Blocked by required conditions
				
					Details
				
			 
		
			
				
	
				Github Actions / integration (10.x, macos-latest, b) (push) Blocked by required conditions
				
					Details
				
			 
		
			
				
	
				Github Actions / integration (10.x, ubuntu-latest, a) (push) Blocked by required conditions
				
					Details
				
			 
		
			
				
	
				Github Actions / integration (10.x, ubuntu-latest, b) (push) Blocked by required conditions
				
					Details
				
			 
		
			
				
	
				Github Actions / integration (10.x, windows-latest, a) (push) Blocked by required conditions
				
					Details
				
			 
		
			
				
	
				Github Actions / integration (10.x, windows-latest, b) (push) Blocked by required conditions
				
					Details
				
			 
		
			
				
	
				Github Actions / integration (12.x, ubuntu-latest, a) (push) Blocked by required conditions
				
					Details
				
			 
		
			
				
	
				Github Actions / integration (14.x, ubuntu-latest, a) (push) Blocked by required conditions
				
					Details
				
			 
		
			
				
	
				Github Actions / integration (16.x, ubuntu-latest, a) (push) Blocked by required conditions
				
					Details
				
			 
		
			
				
	
				Github Actions / integration (18.x, ubuntu-latest, a) (push) Blocked by required conditions
				
					Details
				
			 
		
			
				
	
				Github Actions / integration (18.x, ubuntu-latest, b) (push) Blocked by required conditions
				
					Details
				
			 
		
			
				
	
				Github Actions / integration (20.x, macos-latest, a) (push) Blocked by required conditions
				
					Details
				
			 
		
			
				
	
				Github Actions / integration (20.x, macos-latest, b) (push) Blocked by required conditions
				
					Details
				
			 
		
			
				
	
				Github Actions / integration (20.x, ubuntu-latest, a) (push) Blocked by required conditions
				
					Details
				
			 
		
			
				
	
				Github Actions / integration (20.x, ubuntu-latest, b) (push) Blocked by required conditions
				
					Details
				
			 
		
			
				
	
				Github Actions / integration (20.x, windows-latest, a) (push) Blocked by required conditions
				
					Details
				
			 
		
			
				
	
				Github Actions / integration (20.x, windows-latest, b) (push) Blocked by required conditions
				
					Details
				
			 
		
			
				
	
				Github Actions / integration (22.x, macos-latest, a) (push) Blocked by required conditions
				
					Details
				
			 
		
			
				
	
				Github Actions / integration (22.x, macos-latest, b) (push) Blocked by required conditions
				
					Details
				
			 
		
			
				
	
				Github Actions / integration (22.x, ubuntu-latest, a) (push) Blocked by required conditions
				
					Details
				
			 
		
			
				
	
				Github Actions / integration (22.x, ubuntu-latest, b) (push) Blocked by required conditions
				
					Details
				
			 
		
			
				
	
				Github Actions / integration (22.x, windows-latest, a) (push) Blocked by required conditions
				
					Details
				
			 
		
			
				
	
				Github Actions / integration (22.x, windows-latest, b) (push) Blocked by required conditions
				
					Details
				
			 
		
			
				
	
				Github Actions / integration (23.x, ubuntu-latest, a) (push) Blocked by required conditions
				
					Details
				
			 
		
			
				
	
				Github Actions / integration (23.x, ubuntu-latest, b) (push) Blocked by required conditions
				
					Details
				
			 
		
			
				
	
				Github Actions / integration (lts/*, ubuntu-latest, a, 1) (push) Blocked by required conditions
				
					Details
				
			 
		
			
				
	
				Github Actions / integration (lts/*, ubuntu-latest, b, 1) (push) Blocked by required conditions
				
					Details
				
			 
		
	 | 
			||
|---|---|---|
| .. | ||
| README.md | ||
| a.js | ||
| build.js | ||
| example.js | ||
| template.md | ||
		
			
				
				README.md
			
		
		
			
			
		
	
	example.js
var a = require("./a");
// get module id
var aId = require.resolve("./a.js");
// clear module in require.cache
delete require.cache[aId];
// require module again, it should be reexecuted
var a2 = require("./a");
// verify it
if(a == a2) throw new Error("Cache clear failed :(");
a.js
module.exports = Math.random();
dist/output.js
/******/ (() => { // webpackBootstrap
/******/ 	var __webpack_modules__ = ([
/* 0 */
/*!********************!*\
  !*** ./example.js ***!
  \********************/
/*! unknown exports (runtime-defined) */
/*! runtime requirements: __webpack_require__, __webpack_require__.c, module.id, module.loaded, __webpack_require__.*, module */
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
var a = __webpack_require__(/*! ./a */ 1);
// get module id
var aId = /*require.resolve*/(/*! ./a.js */ 1);
// clear module in require.cache
delete __webpack_require__.c[aId];
// require module again, it should be reexecuted
var a2 = __webpack_require__(/*! ./a */ 1);
// verify it
if(a == a2) throw new Error("Cache clear failed :(");
/***/ }),
/* 1 */
/*!**************!*\
  !*** ./a.js ***!
  \**************/
/*! unknown exports (runtime-defined) */
/*! runtime requirements: module */
/*! CommonJS bailout: module.exports is used directly at 1:0-14 */
/***/ ((module) => {
module.exports = Math.random();
/***/ })
/******/ 	]);
/* webpack runtime code */
/************************************************************************/
/******/ 	// 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] = {
/******/ 			id: moduleId,
/******/ 			loaded: false,
/******/ 			exports: {}
/******/ 		};
/******/ 	
/******/ 		// Execute the module function
/******/ 		__webpack_modules__[moduleId](module, module.exports, __webpack_require__);
/******/ 	
/******/ 		// Flag the module as loaded
/******/ 		module.loaded = true;
/******/ 	
/******/ 		// Return the exports of the module
/******/ 		return module.exports;
/******/ 	}
/******/ 	
/******/ 	// expose the module cache
/******/ 	__webpack_require__.c = __webpack_module_cache__;
/******/ 	
/************************************************************************/
/******/ 	
/******/ 	// module cache are used so entry inlining is disabled
/******/ 	// startup
/******/ 	// Load entry module and return exports
/******/ 	var __webpack_exports__ = __webpack_require__(0);
/******/ 	
/******/ })()
;
Info
Unoptimized
asset output.js 2.41 KiB [emitted] (name: main)
chunk (runtime: main) output.js (main) 313 bytes [entry] [rendered]
  > ./example.js main
  dependent modules 31 bytes [dependent] 1 module
  ./example.js 282 bytes [built] [code generated]
    [used exports unknown]
    entry ./example.js main
webpack X.X.X compiled successfully
Production mode
asset output.js 311 bytes [emitted] [minimized] (name: main)
chunk (runtime: main) output.js (main) 313 bytes [entry] [rendered]
  > ./example.js main
  dependent modules 31 bytes [dependent] 1 module
  ./example.js 282 bytes [built] [code generated]
    [no exports used]
    entry ./example.js main
webpack X.X.X compiled successfully