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.

13 lines 1.72 kB
!function(t){function e(n){if(r[n])return r[n].exports;var o=r[n]={exports:{},id:n,loaded:!1};return t[n].call(o.exports,o,o.exports,e),o.loaded=!0,o.exports}var r={};return e.m=t,e.c=r,e.p="",e(0)}([/*!*****************************************!*\ !*** ./runtime/error-handling/index.js ***! \*****************************************/ function(t,e,r){function n(t){r(1===t?/*! ./folder/file1 */1:2===t?/*! ./folder/file2 */2:3===t?/*! ./folder/file3 */3:!function(){var t=new Error('Cannot find module "./missingModule"');throw t.code="MODULE_NOT_FOUND",t}()).should.be.eql("file"+t),r(1===t?/*! ./folder/file1 */1:2===t?/*! ./folder/file2 */2:3===t?/*! ./folder/file3 */3:!function(){var t=new Error('Cannot find module "./missingModule"');throw t.code="MODULE_NOT_FOUND",t}()).should.be.eql("file"+t)}it("should throw an error on missing module at runtime, but not at compile time if in try block",function(){var t=null;try{n(4)}catch(e){t=e}t.should.be.instanceOf(Error),t=null;try{r(!function(){var t=new Error('Cannot find module "./missingModule2"');throw t.code="MODULE_NOT_FOUND",t}())}catch(e){t=e}t.should.be.instanceOf(Error)})},/*!************************************************!*\ !*** ./runtime/error-handling/folder/file1.js ***! \************************************************/ function(t){t.exports="file1"},/*!************************************************!*\ !*** ./runtime/error-handling/folder/file2.js ***! \************************************************/ function(t){t.exports="file2"},/*!************************************************!*\ !*** ./runtime/error-handling/folder/file3.js ***! \************************************************/ function(t){t.exports="file3"}]);