#1007768 webpack 5 incompatible with eslint-scope >= 7

#1007768#5
Date:
2022-03-16 12:59:43 UTC
From:
To:
Hi,

in lib/optimize/ConcatenatedModule.js, webpack tries to use
eslint-scope/lib/referencer which is no more authorized in
eslint-scope/package.json#exports.

Here is an untested patch.

Cheers,
Yadd
--- a/lib/optimize/ConcatenatedModule.js
+++ b/lib/optimize/ConcatenatedModule.js
@@ -6,7 +6,7 @@
 "use strict";

 const eslintScope = require("eslint-scope");
-const Referencer = require("eslint-scope/lib/referencer");
+const Referencer = eslintScope.Referencer;
 const {
        CachedSource,
        ConcatSource,