File tree Expand file tree Collapse file tree 1 file changed +10
-3
lines changed
Expand file tree Collapse file tree 1 file changed +10
-3
lines changed Original file line number Diff line number Diff line change @@ -175,12 +175,19 @@ HotModuleReplacementPlugin.prototype.apply = function(compiler) {
175175 compiler . parser . plugin ( "call module.hot.accept" , function ( expr ) {
176176 if ( ! this . state . compilation . hotUpdateChunkTemplate ) return false ;
177177 if ( expr . arguments . length > 1 ) {
178- var param = this . evaluateExpression ( expr . arguments [ 0 ] ) ;
179- if ( param . isString ( ) ) {
178+ var arg = this . evaluateExpression ( expr . arguments [ 0 ] ) ;
179+ var params = [ ] ;
180+ if ( arg . isString ( ) ) {
181+ params = [ arg ] ;
182+ }
183+ if ( arg . isArray ( ) ) {
184+ params = arg . items ;
185+ }
186+ params . forEach ( function ( param ) {
180187 var dep = new ModuleHotAcceptDependency ( param . string , param . range ) ;
181188 dep . optional = true ;
182189 this . state . module . addDependency ( dep ) ;
183- }
190+ } . bind ( this ) ) ;
184191 }
185192 } ) ;
186193 compiler . parser . plugin ( "call module.hot.decline" , function ( expr ) {
You can’t perform that action at this time.
0 commit comments