File tree Expand file tree Collapse file tree 1 file changed +13
-0
lines changed Expand file tree Collapse file tree 1 file changed +13
-0
lines changed Original file line number Diff line number Diff line change @@ -252,13 +252,26 @@ class DevServerPlugin {
252
252
253
253
// use a hook to add entries if available
254
254
if ( typeof webpack . EntryPlugin !== 'undefined' ) {
255
+ // Register Entry Dependency in Factory
256
+ const EntryDependency = require ( 'webpack/lib/dependencies/EntryDependency' ) ;
257
+ compiler . hooks . compilation . tap (
258
+ 'webpack-dev-server' ,
259
+ ( compilation , { normalModuleFactory } ) => {
260
+ compilation . dependencyFactories . set (
261
+ EntryDependency ,
262
+ normalModuleFactory
263
+ ) ;
264
+ }
265
+ ) ;
266
+
255
267
// eslint-disable-next-line no-undefined
256
268
const entryOptions = { name : undefined } ;
257
269
compiler . hooks . make . tapAsync (
258
270
'webpack-dev-server' ,
259
271
( compilation , callback ) => {
260
272
let entriesCompleted = 0 ;
261
273
const errors = [ ] ;
274
+ // Register additionalEntries
262
275
for ( const additionalEntry of additionalEntries ) {
263
276
const dependency = webpack . EntryPlugin . createDependency (
264
277
additionalEntry ,
You can’t perform that action at this time.
0 commit comments