@@ -57,15 +57,15 @@ module.exports = class MainTemplate extends Tapable {
5757 // It's weird here
5858 hotBootstrap : new SyncWaterfallHook ( [ "source" , "chunk" , "hash" ] )
5959 } ;
60- this . plugin ( "startup ", ( source , chunk , hash ) => {
60+ this . hooks . startup . tap ( "MainTemplate ", ( source , chunk , hash ) => {
6161 const buf = [ ] ;
6262 if ( chunk . entryModule ) {
6363 buf . push ( "// Load entry module and return exports" ) ;
6464 buf . push ( `return ${ this . renderRequireFunctionForModule ( hash , chunk , JSON . stringify ( chunk . entryModule . id ) ) } (${ this . requireFn } .s = ${ JSON . stringify ( chunk . entryModule . id ) } );` ) ;
6565 }
6666 return Template . asString ( buf ) ;
6767 } ) ;
68- this . plugin ( "render ", ( bootstrapSource , chunk , hash , moduleTemplate , dependencyTemplates ) => {
68+ this . hooks . render . tap ( "MainTemplate ", ( bootstrapSource , chunk , hash , moduleTemplate , dependencyTemplates ) => {
6969 const source = new ConcatSource ( ) ;
7070 source . add ( "/******/ (function(modules) { // webpackBootstrap\n" ) ;
7171 source . add ( new PrefixSource ( "/******/" , bootstrapSource ) ) ;
@@ -77,14 +77,14 @@ module.exports = class MainTemplate extends Tapable {
7777 source . add ( ")" ) ;
7878 return source ;
7979 } ) ;
80- this . plugin ( "local-vars ", ( source , chunk , hash ) => {
80+ this . hooks . localVars . tap ( "MainTemplate ", ( source , chunk , hash ) => {
8181 return Template . asString ( [
8282 source ,
8383 "// The module cache" ,
8484 "var installedModules = {};"
8585 ] ) ;
8686 } ) ;
87- this . plugin ( "require ", ( source , chunk , hash ) => {
87+ this . hooks . require . tap ( "MainTemplate ", ( source , chunk , hash ) => {
8888 return Template . asString ( [
8989 source ,
9090 "// Check if module is in cache" ,
@@ -121,14 +121,14 @@ module.exports = class MainTemplate extends Tapable {
121121 "return module.exports;"
122122 ] ) ;
123123 } ) ;
124- this . plugin ( "module-obj ", ( source , chunk , hash , varModuleId ) => {
124+ this . hooks . moduleObj . tap ( "MainTemplate ", ( source , chunk , hash , varModuleId ) => {
125125 return Template . asString ( [
126126 "i: moduleId," ,
127127 "l: false," ,
128128 "exports: {}"
129129 ] ) ;
130130 } ) ;
131- this . plugin ( "require-extensions ", ( source , chunk , hash ) => {
131+ this . hooks . requireExtensions . tap ( "MainTemplate ", ( source , chunk , hash ) => {
132132 const buf = [ ] ;
133133 if ( chunk . getNumberOfChunks ( ) > 0 ) {
134134 buf . push ( "// This file contains only the entry chunk." ) ;
0 commit comments