File tree Expand file tree Collapse file tree 1 file changed +3
-8
lines changed
lib/webpack-manifest-plugin Expand file tree Collapse file tree 1 file changed +3
-8
lines changed Original file line number Diff line number Diff line change 88 */
99const { relative, resolve } = require ( 'path' ) ;
1010
11- const webpack = require ( 'webpack' ) ;
1211const NormalModule = require ( 'webpack/lib/NormalModule' ) ;
1312
1413const { beforeRunHook, emitHook, getCompilerHooks, normalModuleLoaderHook } = require ( './hooks' ) ;
@@ -65,13 +64,9 @@ class WebpackManifestPlugin {
6564 hook . tap ( hookOptions , normalModuleLoader ) ;
6665 } ) ;
6766
68- if ( webpack . version . startsWith ( '4' ) ) {
69- compiler . hooks . emit . tap ( hookOptions , emit ) ;
70- } else {
71- compiler . hooks . thisCompilation . tap ( hookOptions , ( compilation ) => {
72- compilation . hooks . processAssets . tap ( hookOptions , ( ) => emit ( compilation ) ) ;
73- } ) ;
74- }
67+ compiler . hooks . thisCompilation . tap ( hookOptions , ( compilation ) => {
68+ compilation . hooks . processAssets . tap ( hookOptions , ( ) => emit ( compilation ) ) ;
69+ } ) ;
7570
7671 compiler . hooks . run . tap ( hookOptions , beforeRun ) ;
7772 compiler . hooks . watchRun . tap ( hookOptions , beforeRun ) ;
You can’t perform that action at this time.
0 commit comments