UNPKG

webpack

Version:

Packs CommonJs/AMD modules for the browser. Allows to split your codebase into multiple bundles, which can be loaded on demand. Support loaders to preprocess files, i.e. json, jade, coffee, css, less, ... and your custom stuff.

80 lines (72 loc) 4.58 kB
/******/ (function(modules) { // webpackBootstrap /******/ // The module cache /******/ var installedModules = {}; /******/ /******/ // The require function /******/ function __webpack_require__(moduleId) { /******/ /******/ // Check if module is in cache /******/ if(installedModules[moduleId]) /******/ return installedModules[moduleId].exports; /******/ /******/ // Create a new module (and put it into the cache) /******/ var module = installedModules[moduleId] = { /******/ exports: {}, /******/ id: moduleId, /******/ loaded: false /******/ }; /******/ /******/ // Execute the module function /******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); /******/ /******/ // Flag the module as loaded /******/ module.loaded = true; /******/ /******/ // Return the exports of the module /******/ return module.exports; /******/ } /******/ /******/ /******/ // expose the modules object (__webpack_modules__) /******/ __webpack_require__.m = modules; /******/ /******/ // expose the module cache /******/ __webpack_require__.c = installedModules; /******/ /******/ // __webpack_public_path__ /******/ __webpack_require__.p = ""; /******/ /******/ // Load entry module and return exports /******/ return __webpack_require__(0); /******/ }) /************************************************************************/ /******/ ([ /* 0 */ /*!*****************************************!*\ !*** ./runtime/error-handling/index.js ***! \*****************************************/ /***/ function(module, exports, __webpack_require__) { eval("function testCase(number) {\r\n\t__webpack_require__(number === 1 ? /*! ./folder/file1 */ 1 : number === 2 ? /*! ./folder/file2 */ 2 : number === 3 ? /*! ./folder/file3 */ 3 : !(function webpackMissingModule() { var e = new Error(\"Cannot find module \\\"./missingModule\\\"\"); e.code = 'MODULE_NOT_FOUND'; throw e; }())).should.be.eql(\"file\" + number);\r\n\t__webpack_require__(\r\n\t\tnumber === 1 ? /*! ./folder/file1 */ 1 :\r\n\t\tnumber === 2 ? /*! ./folder/file2 */ 2 :\r\n\t\tnumber === 3 ? /*! ./folder/file3 */ 3 :\r\n\t\t!(function webpackMissingModule() { var e = new Error(\"Cannot find module \\\"./missingModule\\\"\"); e.code = 'MODULE_NOT_FOUND'; throw e; }())\r\n\t).should.be.eql(\"file\" + number);\r\n}\r\n\r\n\r\nit(\"should throw an error on missing module at runtime, but not at compile time if in try block\", function() {\r\n\tvar error = null;\r\n\ttry {\r\n\t\ttestCase(4); // indirect\r\n\t} catch(e) {\r\n\t\terror = e;\r\n\t}\r\n\terror.should.be.instanceOf(Error);\r\n\r\n\terror = null;\r\n\ttry {\r\n\t\t__webpack_require__(!(function webpackMissingModule() { var e = new Error(\"Cannot find module \\\"./missingModule2\\\"\"); e.code = 'MODULE_NOT_FOUND'; throw e; }())); // direct\r\n\t} catch(e) {\r\n\t\terror = e;\r\n\t}\r\n\terror.should.be.instanceOf(Error);\r\n});\r\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./runtime/error-handling/index.js\n ** module id = 0\n ** module chunks = 0\n **/\n//# sourceURL=webpack:///./runtime/error-handling/index.js?"); /***/ }, /* 1 */ /*!************************************************!*\ !*** ./runtime/error-handling/folder/file1.js ***! \************************************************/ /***/ function(module, exports, __webpack_require__) { eval("module.exports = \"file1\";\n\n/*****************\n ** WEBPACK FOOTER\n ** ./runtime/error-handling/folder/file1.js\n ** module id = 1\n ** module chunks = 0\n **/\n//# sourceURL=webpack:///./runtime/error-handling/folder/file1.js?"); /***/ }, /* 2 */ /*!************************************************!*\ !*** ./runtime/error-handling/folder/file2.js ***! \************************************************/ /***/ function(module, exports, __webpack_require__) { eval("module.exports = \"file2\";\n\n/*****************\n ** WEBPACK FOOTER\n ** ./runtime/error-handling/folder/file2.js\n ** module id = 2\n ** module chunks = 0\n **/\n//# sourceURL=webpack:///./runtime/error-handling/folder/file2.js?"); /***/ }, /* 3 */ /*!************************************************!*\ !*** ./runtime/error-handling/folder/file3.js ***! \************************************************/ /***/ function(module, exports, __webpack_require__) { eval("module.exports = \"file3\";\n\n/*****************\n ** WEBPACK FOOTER\n ** ./runtime/error-handling/folder/file3.js\n ** module id = 3\n ** module chunks = 0\n **/\n//# sourceURL=webpack:///./runtime/error-handling/folder/file3.js?"); /***/ } /******/ ])