Skip to content

Commit cc6858e

Browse files
fix(module-federation): restore deep import paths and expose their helpers (#22934)
* fix(module-federation): restore deep import paths and expose their helpers Re-export the lib/ paths @module-federation/enhanced 2.9.2 loads, expose the helpers it needs on compiler.webpack, and teach find-deep-imports to read wrapped requires and scan packages without keywords. * chore: shorten the changeset
1 parent abf2784 commit cc6858e

22 files changed

Lines changed: 860 additions & 85 deletions
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"webpack": minor
3+
---
4+
5+
Restore deep import paths Module Federation loads and expose its helpers.

‎lib/ChunkGraph.js‎

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
/*
2+
MIT License http://www.opensource.org/licenses/mit-license.php
3+
Author Alexander Akait @alexander-akait
4+
*/
5+
6+
"use strict";
7+
8+
// TODO in the next major release: remove
9+
// Some old plugins use `require("webpack/lib/ChunkGraph")`, in the next major release developer should migrate to `compiler.webpack.ChunkGraph`
10+
module.exports = require("./graph/ChunkGraph");

‎lib/HotUpdateChunk.js‎

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
/*
2+
MIT License http://www.opensource.org/licenses/mit-license.php
3+
Author Alexander Akait @alexander-akait
4+
*/
5+
6+
"use strict";
7+
8+
// TODO in the next major release: remove
9+
// Some old plugins use `require("webpack/lib/HotUpdateChunk")`, in the next major release developer should migrate to `compiler.webpack.HotUpdateChunk`
10+
module.exports = require("./graph/HotUpdateChunk");

‎lib/ModuleFactory.js‎

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
/*
2+
MIT License http://www.opensource.org/licenses/mit-license.php
3+
Author Alexander Akait @alexander-akait
4+
*/
5+
6+
"use strict";
7+
8+
// TODO in the next major release: remove
9+
// Some old plugins use `require("webpack/lib/ModuleFactory")`, in the next major release developer should migrate to `compiler.webpack.ModuleFactory`
10+
module.exports = require("./module/ModuleFactory");

‎lib/ResolverFactory.js‎

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
/*
2+
MIT License http://www.opensource.org/licenses/mit-license.php
3+
Author Alexander Akait @alexander-akait
4+
*/
5+
6+
"use strict";
7+
8+
// TODO in the next major release: remove
9+
// Some old plugins use `require("webpack/lib/ResolverFactory")`, in the next major release developer should migrate to the `Compiler["resolverFactory"]` type
10+
module.exports = require("./resolve/ResolverFactory");

‎lib/RuntimeGlobals.js‎

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
/*
2+
MIT License http://www.opensource.org/licenses/mit-license.php
3+
Author Alexander Akait @alexander-akait
4+
*/
5+
6+
"use strict";
7+
8+
// TODO in the next major release: remove
9+
// Some old plugins use `require("webpack/lib/RuntimeGlobals")`, in the next major release developer should migrate to `compiler.webpack.runtime.RuntimeGlobals`
10+
module.exports = require("./runtime/RuntimeGlobals");

‎lib/RuntimeModule.js‎

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
/*
2+
MIT License http://www.opensource.org/licenses/mit-license.php
3+
Author Alexander Akait @alexander-akait
4+
*/
5+
6+
"use strict";
7+
8+
// TODO in the next major release: remove
9+
// Some old plugins use `require("webpack/lib/RuntimeModule")`, in the next major release developer should migrate to `compiler.webpack.runtime.RuntimeModule`
10+
module.exports = require("./runtime/RuntimeModule");

‎lib/RuntimeTemplate.js‎

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
/*
2+
MIT License http://www.opensource.org/licenses/mit-license.php
3+
Author Alexander Akait @alexander-akait
4+
*/
5+
6+
"use strict";
7+
8+
// TODO in the next major release: remove
9+
// Some old plugins use `require("webpack/lib/RuntimeTemplate")`, in the next major release developer should migrate to the `Compilation["runtimeTemplate"]` type
10+
module.exports = require("./template/RuntimeTemplate");
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
/*
2+
MIT License http://www.opensource.org/licenses/mit-license.php
3+
Author Alexander Akait @alexander-akait
4+
*/
5+
6+
"use strict";
7+
8+
// TODO in the next major release: remove
9+
// Some old plugins use `require("webpack/lib/dependencies/EntryDependency")`, in the next major release developer should migrate to `compiler.webpack.dependencies.EntryDependency`
10+
module.exports = require("../entry/EntryDependency");
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
/*
2+
MIT License http://www.opensource.org/licenses/mit-license.php
3+
Author Alexander Akait @alexander-akait
4+
*/
5+
6+
"use strict";
7+
8+
// TODO in the next major release: remove
9+
// Some old plugins use `require("webpack/lib/dependencies/ModuleDependency")`, in the next major release developer should migrate to `compiler.webpack.dependencies.ModuleDependency`
10+
module.exports = require("./core/ModuleDependency");

0 commit comments

Comments
 (0)