@@ -27,7 +27,7 @@ module.exports = class MainTemplate extends Template {
2727 constructor ( outputOptions ) {
2828 super ( outputOptions ) ;
2929 this . plugin ( "startup" , ( source , chunk , hash ) => {
30- let buf = [ ] ;
30+ const buf = [ ] ;
3131 if ( chunk . entryModule ) {
3232 buf . push ( "// Load entry module and return exports" ) ;
3333 buf . push ( "return " + this . renderRequireFunctionForModule ( hash , chunk , JSON . stringify ( chunk . entryModule . id ) ) +
@@ -36,13 +36,13 @@ module.exports = class MainTemplate extends Template {
3636 return this . asString ( buf ) ;
3737 } ) ;
3838 this . plugin ( "render" , ( bootstrapSource , chunk , hash , moduleTemplate , dependencyTemplates ) => {
39- let source = new ConcatSource ( ) ;
39+ const source = new ConcatSource ( ) ;
4040 source . add ( "/******/ (function(modules) { // webpackBootstrap\n" ) ;
4141 source . add ( new PrefixSource ( "/******/" , bootstrapSource ) ) ;
4242 source . add ( "/******/ })\n" ) ;
4343 source . add ( "/************************************************************************/\n" ) ;
4444 source . add ( "/******/ (" ) ;
45- let modules = this . renderChunkModules ( chunk , moduleTemplate , dependencyTemplates , "/******/ " ) ;
45+ const modules = this . renderChunkModules ( chunk , moduleTemplate , dependencyTemplates , "/******/ " ) ;
4646 source . add ( this . applyPluginsWaterfall ( "modules" , modules , chunk , hash , moduleTemplate , dependencyTemplates ) ) ;
4747 source . add ( ")" ) ;
4848 return source ;
@@ -99,7 +99,7 @@ module.exports = class MainTemplate extends Template {
9999 ] ) ;
100100 } ) ;
101101 this . plugin ( "require-extensions" , ( source , chunk , hash ) => {
102- let buf = [ ] ;
102+ const buf = [ ] ;
103103 if ( chunk . chunks . length > 0 ) {
104104 buf . push ( "// This file contains only the entry chunk." ) ;
105105 buf . push ( "// The chunk loading function for additional chunks" ) ;
@@ -155,7 +155,7 @@ module.exports = class MainTemplate extends Template {
155155 buf . push ( "// Object.prototype.hasOwnProperty.call" ) ;
156156 buf . push ( this . requireFn + ".o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };" ) ;
157157
158- let publicPath = this . getPublicPath ( {
158+ const publicPath = this . getPublicPath ( {
159159 hash : hash
160160 } ) ;
161161 buf . push ( "" ) ;
@@ -168,7 +168,7 @@ module.exports = class MainTemplate extends Template {
168168 }
169169
170170 render ( hash , chunk , moduleTemplate , dependencyTemplates ) {
171- let buf = [ ] ;
171+ const buf = [ ] ;
172172 buf . push ( this . applyPluginsWaterfall ( "bootstrap" , "" , chunk , hash , moduleTemplate , dependencyTemplates ) ) ;
173173 buf . push ( this . applyPluginsWaterfall ( "local-vars" , "" , chunk , hash ) ) ;
174174 buf . push ( "" ) ;
@@ -203,7 +203,7 @@ module.exports = class MainTemplate extends Template {
203203 }
204204
205205 entryPointInChildren ( chunk ) {
206- let checkChildren = ( chunk , alreadyCheckedChunks ) => {
206+ const checkChildren = ( chunk , alreadyCheckedChunks ) => {
207207 return chunk . chunks . some ( ( child ) => {
208208 if ( alreadyCheckedChunks . indexOf ( child ) >= 0 ) return ;
209209 alreadyCheckedChunks . push ( child ) ;
@@ -230,7 +230,7 @@ module.exports = class MainTemplate extends Template {
230230 }
231231
232232 useChunkHash ( chunk ) {
233- let paths = this . applyPluginsWaterfall ( "global-hash-paths" , [ ] ) ;
233+ const paths = this . applyPluginsWaterfall ( "global-hash-paths" , [ ] ) ;
234234 return ! this . applyPluginsBailResult ( "global-hash" , chunk , paths ) ;
235235 }
236236} ;
0 commit comments