@@ -15,18 +15,6 @@ if (!process.env.WEBPACK_SERVE) {
15
15
process . env . WEBPACK_SERVE = true ;
16
16
}
17
17
18
- class AssetsInfoPlugin {
19
- constructor ( callback ) {
20
- this . callback = callback ;
21
- }
22
- // eslint-disable-next-line class-methods-use-this
23
- apply ( compiler ) {
24
- compiler . hooks . done . tap ( "assets-info-plugin" , ( stats ) => {
25
- this . callback ( stats . compilation . assetsInfo ) ;
26
- } ) ;
27
- }
28
- }
29
-
30
18
class Server {
31
19
constructor ( options = { } , compiler ) {
32
20
// TODO: remove this after plugin support is published
@@ -1080,12 +1068,6 @@ class Server {
1080
1068
plugin . apply ( compiler ) ;
1081
1069
}
1082
1070
}
1083
-
1084
- if ( this . options . magicHtml ) {
1085
- new AssetsInfoPlugin ( ( assetsInfo ) => {
1086
- this . assetsInfo = assetsInfo ;
1087
- } ) . apply ( this . compiler ) ;
1088
- }
1089
1071
} ) ;
1090
1072
1091
1073
if ( this . options . client && this . options . client . progress ) {
@@ -1962,7 +1944,7 @@ class Server {
1962
1944
const splitOutputFilename = outputFilename . split ( "." ) ;
1963
1945
let isOutputModule = false ;
1964
1946
1965
- this . assetsInfo . forEach ( ( value , key ) => {
1947
+ this . stats . compilation . assetsInfo . forEach ( ( value , key ) => {
1966
1948
// main.js => ["main", "js"]
1967
1949
// main.another.js => ["main", "another", "js"]
1968
1950
const splitKey = key . split ( "." ) ;
@@ -1972,7 +1954,7 @@ class Server {
1972
1954
// If key = main.other.mjs && filename = main.other => true
1973
1955
if (
1974
1956
splitKey . length - 1 === splitOutputFilename . length &&
1975
- key . split ( "." ) [ 0 ] === outputFilename . split ( "." ) [ 0 ]
1957
+ splitKey [ 0 ] === outputFilename . split ( "." ) [ 0 ]
1976
1958
) {
1977
1959
extension = splitKey [ splitKey . length - 1 ] ;
1978
1960
isOutputModule = value . javascriptModule ;
0 commit comments