@ -27,7 +27,7 @@ MainTemplate.prototype.render = function(hash, chunk, moduleTemplate, dependency
buf . push ( this . asString ( this . renderInit ( hash , chunk ) ) ) ;
buf . push ( "" ) ;
buf . push ( "// Load entry module and return exports" ) ;
buf . push ( "return " + this . re quireFn + "(0);" ) ;
buf . push ( "return " + this . re nderRe quireFu nctionForModule( hash , chunk , "0" ) + "(0);" ) ;
var source = new ConcatSource ( ) ;
source . add ( "/******/ (function(modules) { // webpackBootstrap\n" ) ;
source . add ( new PrefixSource ( "/******/ \t" , new OriginalSource ( this . asString ( buf ) , "webpackBootstrap " + hash ) ) ) ;
@ -91,15 +91,11 @@ MainTemplate.prototype.renderRequireContent = function(hash, chunk) {
"" ,
"// Create a new module (and put it into the cache)" ,
"var module = installedModules[moduleId] = {" ,
this . indent ( [
"exports: {}," ,
"id: moduleId," ,
"loaded: false"
] ) ,
this . indent ( this . renderModule ( hash , chunk , "moduleId" ) ) ,
"};" ,
"" ,
"// Execute the module function" ,
"modules[moduleId].call(null, module, module.exports, " + this . re quireFn + ");" ,
"modules[moduleId].call(null, module, module.exports, " + this . renderRequireFunctionForModule ( hash , chunk , "moduleId" ) + ");" ,
"" ,
"// Flag the module as loaded" ,
"module.loaded = true;" ,
@ -109,6 +105,18 @@ MainTemplate.prototype.renderRequireContent = function(hash, chunk) {
] ;
} ;
MainTemplate . prototype . renderRequireFunctionForModule = function ( hash , chunk , varModuleId ) {
return this . requireFn ;
} ;
MainTemplate . prototype . renderModule = function ( hash , chunk , varModuleId ) {
return [
"exports: {}," ,
"id: moduleId," ,
"loaded: false"
] ;
} ;
MainTemplate . prototype . renderRequireExtensions = function ( hash , chunk ) {
var buf = [ ] ;
if ( chunk . chunks . length == 0 ) {