We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent b53ae44 commit f7ee30bCopy full SHA for f7ee30b
lib/plugin-webpack5.js
@@ -31,9 +31,10 @@ const ruleSetCompiler = new RuleSetCompiler([
31
32
class VueLoaderPlugin {
33
apply (compiler) {
34
+ const normalModule = compiler.webpack.NormalModule || require("webpack/lib/NormalModule")
35
// add NS marker so that the loader can detect and report missing plugin
36
compiler.hooks.compilation.tap(id, compilation => {
- const normalModuleLoader = require('webpack/lib/NormalModule').getCompilationHooks(compilation).loader
37
+ const normalModuleLoader = normalModule.getCompilationHooks(compilation).loader
38
normalModuleLoader.tap(id, loaderContext => {
39
loaderContext[NS] = true
40
})
0 commit comments