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.
105 lines (98 loc) • 4.16 kB
JavaScript
/******/ (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 */
/*!****************************************!*\
!*** ./parsing/local-modules/index.js ***!
\****************************************/
/***/ function(module, exports, __webpack_require__) {
var __WEBPACK_LOCAL_MODULE_0__;var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_LOCAL_MODULE_3__;var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_LOCAL_MODULE_2__;var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;var __WEBPACK_LOCAL_MODULE_1__;it("should define and require a local module", function() {
module.exports = "not set";
!(__WEBPACK_LOCAL_MODULE_0__ = function() {
return 1234;
}.call(exports, __webpack_require__, exports, module));
module.exports.should.be.eql("not set");
!(__WEBPACK_AMD_DEFINE_ARRAY__ = [__WEBPACK_LOCAL_MODULE_0__], __WEBPACK_AMD_DEFINE_RESULT__ = function(myModule) {
myModule.should.be.eql(1234);
return 2345;
}.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
module.exports.should.be.eql(2345);
__WEBPACK_LOCAL_MODULE_0__.should.be.eql(1234);
!/* require */(/* empty */[__WEBPACK_LOCAL_MODULE_0__]);
});
it("should not create a chunk for a AMD require to a local module", function() {
!(__WEBPACK_LOCAL_MODULE_1__ = function() {
return 1235;
}.call(exports, __webpack_require__, exports, module));
var sync = false;
!/* require */(/* empty */function() { var __WEBPACK_AMD_REQUIRE_ARRAY__ = [__WEBPACK_LOCAL_MODULE_1__]; (function(myModule2) {
myModule2.should.be.eql(1235);
sync = true;
}.apply(null, __WEBPACK_AMD_REQUIRE_ARRAY__));}());
sync.should.be.eql(true);
});
it("should define and require a local module with deps", function() {
module.exports = "not set";
!(__WEBPACK_AMD_DEFINE_ARRAY__ = [__webpack_require__(/*! ./dep */ 1)], __WEBPACK_LOCAL_MODULE_2__ = (function(dep) {
dep.should.be.eql("dep");
return 1234;
}.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)));
module.exports.should.be.eql("not set");
!(__WEBPACK_AMD_DEFINE_ARRAY__ = [__WEBPACK_LOCAL_MODULE_2__, __webpack_require__(/*! ./dep */ 1)], __WEBPACK_LOCAL_MODULE_3__ = (function(myModule, dep) {
dep.should.be.eql("dep");
myModule.should.be.eql(1234);
return 2345;
}.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)));
module.exports.should.be.eql("not set");
__WEBPACK_LOCAL_MODULE_2__.should.be.eql(1234);
__WEBPACK_LOCAL_MODULE_3__.should.be.eql(2345);
});
/***/ },
/* 1 */
/*!**************************************!*\
!*** ./parsing/local-modules/dep.js ***!
\**************************************/
/***/ function(module, exports, __webpack_require__) {
module.exports = "dep";
/***/ }
/******/ ])