File tree 2 files changed +9
-2
lines changed
2 files changed +9
-2
lines changed Original file line number Diff line number Diff line change @@ -10,7 +10,14 @@ class VueLoaderPlugin {
10
10
if ( compiler . hooks ) {
11
11
// webpack 4
12
12
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 => {
14
21
loaderContext [ NS ] = true
15
22
} )
16
23
} )
Original file line number Diff line number Diff line change 34
34
},
35
35
"peerDependencies" : {
36
36
"css-loader" : " *" ,
37
- "webpack" : " ^4.1.0"
37
+ "webpack" : " ^4.1.0 || ^5.0.0-0 "
38
38
},
39
39
"dependencies" : {
40
40
"@vue/component-compiler-utils" : " ^2.4.0" ,
You can’t perform that action at this time.
0 commit comments