We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 2eccc0e commit 820d23cCopy full SHA for 820d23c
src/pluginWebpack5.ts
@@ -98,14 +98,16 @@ class VueLoaderPlugin implements Plugin {
98
static NS = NS
99
100
apply(compiler: Compiler) {
101
+ // @ts-ignore
102
+ const normalModule = compiler.webpack.NormalModule || NormalModule
103
+
104
// add NS marker so that the loader can detect and report missing plugin
105
compiler.hooks.compilation.tap(id, (compilation) => {
- NormalModule.getCompilationHooks(compilation).loader.tap(
- id,
- (loaderContext: any) => {
106
+ normalModule
107
+ .getCompilationHooks(compilation)
108
+ .loader.tap(id, (loaderContext: any) => {
109
loaderContext[NS] = true
- }
- )
110
+ })
111
})
112
113
const rules = compiler.options.module!.rules
0 commit comments