File tree Expand file tree Collapse file tree 2 files changed +9
-2
lines changed Expand file tree Collapse file tree 2 files changed +9
-2
lines changed Original file line number Diff line number Diff line change @@ -10,7 +10,14 @@ class VueLoaderPlugin {
1010 if ( compiler . hooks ) {
1111 // webpack 4
1212 compiler . hooks . compilation . tap ( id , compilation => {
13- compilation . hooks . normalModuleLoader . tap ( id , loaderContext => {
13+ let normalModuleLoader
14+ if ( Object . isFrozen ( compilation . hooks ) ) {
15+ // webpack 5
16+ normalModuleLoader = require ( 'webpack/lib/NormalModule' ) . getCompilationHooks ( compilation ) . loader
17+ } else {
18+ normalModuleLoader = compilation . hooks . normalModuleLoader
19+ }
20+ normalModuleLoader . tap ( id , loaderContext => {
1421 loaderContext [ NS ] = true
1522 } )
1623 } )
Original file line number Diff line number Diff line change 3434 },
3535 "peerDependencies" : {
3636 "css-loader" : " *" ,
37- "webpack" : " ^4.1.0"
37+ "webpack" : " ^4.1.0 || ^5.0.0-0 "
3838 },
3939 "dependencies" : {
4040 "@vue/component-compiler-utils" : " ^2.4.0" ,
You can’t perform that action at this time.
0 commit comments