whitespace and comment fixes
This commit is contained in:
parent
a2fdd756c1
commit
a56cada9ba
|
@ -29,11 +29,11 @@ MainTemplate.prototype.render = function(hash, chunk, moduleTemplate, dependency
|
|||
buf.push("// Load entry module and return exports");
|
||||
buf.push("return " + this.requireFn + "(0);");
|
||||
var source = new ConcatSource();
|
||||
source.add("/******/(function(modules) { // webpackBootstrap\n");
|
||||
source.add(new PrefixSource("/******/\t", new OriginalSource(this.asString(buf), "webpackBootstrap " + hash)));
|
||||
source.add("\n/******/})\n");
|
||||
source.add("/******/ (function(modules) { // webpackBootstrap\n");
|
||||
source.add(new PrefixSource("/******/ \t", new OriginalSource(this.asString(buf), "webpackBootstrap " + hash)));
|
||||
source.add("\n/******/ })\n");
|
||||
source.add("/************************************************************************/\n");
|
||||
source.add("({\n");
|
||||
source.add("/******/ ({\n");
|
||||
source.add(this.asString(this.renderInitModules(hash, chunk, moduleTemplate, dependencyTemplates)));
|
||||
source.add("\n");
|
||||
chunk.modules.forEach(function(module, idx) {
|
||||
|
@ -41,7 +41,7 @@ MainTemplate.prototype.render = function(hash, chunk, moduleTemplate, dependency
|
|||
source.add("\n/***/ " + module.id + ":\n");
|
||||
source.add(moduleTemplate.render(module, dependencyTemplates));
|
||||
});
|
||||
source.add("\n})");
|
||||
source.add("\n/******/ })");
|
||||
return source;
|
||||
};
|
||||
|
||||
|
@ -103,15 +103,15 @@ MainTemplate.prototype.renderRequireContent = function(hash, chunk) {
|
|||
MainTemplate.prototype.renderRequireExtensions = function(hash, chunk) {
|
||||
var buf = [];
|
||||
if(chunk.chunks.length == 0) {
|
||||
buf.push("// This file contains only the entry chunk.");
|
||||
buf.push("// The chunk loading function for additional chunks");
|
||||
buf.push("// The bundle contains no chunks. A empty chunk loading function.");
|
||||
buf.push(this.requireFn + ".e = function requireEnsure(_, callback) {");
|
||||
buf.push(this.indent([
|
||||
"callback.call(null, require);"
|
||||
]));
|
||||
buf.push("};");
|
||||
} else {
|
||||
buf.push("// The bundle contains no chunks. A empty chunk loading function.");
|
||||
buf.push("// This file contains only the entry chunk.");
|
||||
buf.push("// The chunk loading function for additional chunks");
|
||||
buf.push(this.requireFn + ".e = function requireEnsure(chunkId, callback) {");
|
||||
buf.push(this.indent(this.renderRequireEnsure(hash, chunk)));
|
||||
buf.push("};");
|
||||
|
@ -132,8 +132,8 @@ MainTemplate.prototype.renderInit = function(hash, chunk) {
|
|||
MainTemplate.prototype.renderInitModules = function(hash, chunk, moduleTemplate, dependencyTemplates) {
|
||||
var publicPath = this.outputOptions.publicPath || "";
|
||||
return [
|
||||
"// __webpack_public_path__",
|
||||
"c: " + JSON.stringify(publicPath.replace(Template.REGEXP_HASH, hash)) + ","
|
||||
"/******/ // __webpack_public_path__",
|
||||
"/******/ c: " + JSON.stringify(publicPath.replace(Template.REGEXP_HASH, hash)) + ","
|
||||
];
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in New Issue