File tree Expand file tree Collapse file tree 1 file changed +1
-31
lines changed Expand file tree Collapse file tree 1 file changed +1
-31
lines changed Original file line number Diff line number Diff line change @@ -11,37 +11,7 @@ const normalize = (entry) => entry.split(path.sep).join('/');
1111
1212describe ( 'DevServerPlugin util' , ( ) => {
1313 async function getEntries ( compiler ) {
14- const entryOption = compiler . options . entry ;
15- if ( isWebpack5 ) {
16- const entries = [ ] ;
17-
18- const compilation = {
19- addEntry ( _context , dep , _options , cb ) {
20- if ( ! dep . loc . name ) {
21- entries . push ( dep . request ) ;
22- }
23- cb ( ) ;
24- } ,
25- } ;
26- await Promise . all (
27- compiler . hooks . make . taps
28- . filter ( ( tap ) => tap . name === 'DevServerPlugin' )
29- . map ( ( tap ) => tap . fn ( compilation ) )
30- ) ;
31-
32- // normalize entry descriptors
33- if ( typeof entryOption === 'function' ) {
34- // merge entries into the dynamic entry function
35- Object . assign ( entryOption , entries ) ;
36- return entryOption ;
37- } else if ( entryOption . main ) {
38- entries . push ( ...entryOption . main . import ) ;
39- }
40- // merge named exports into entries
41- Object . assign ( entries , entryOption ) ;
42- return entries ;
43- }
44- return entryOption ;
14+ return compiler . options . entry ;
4515 }
4616
4717 it ( 'should preserves dynamic entry points' , ( done ) => {
You can’t perform that action at this time.
0 commit comments