Unverified Commit 64abfd16 authored by JJ Kasper's avatar JJ Kasper Committed by GitHub

Remove unused dependencyFactory plugin code (#74661)

These internal APIs should not be necessary so removing them to avoid
confusion/un-necessary APIs from being used.

x-ref: [slack
thread](https://vercel.slack.com/archives/C0861RLN3AP/p1736181537629329?thread_ts=1736180335.833419&cid=C0861RLN3AP)
parent 6e6a3308
...@@ -25,20 +25,6 @@ export class AppBuildManifestPlugin { ...@@ -25,20 +25,6 @@ export class AppBuildManifestPlugin {
} }
public apply(compiler: any) { public apply(compiler: any) {
compiler.hooks.compilation.tap(
PLUGIN_NAME,
(compilation: any, { normalModuleFactory }: any) => {
compilation.dependencyFactories.set(
webpack.dependencies.ModuleDependency,
normalModuleFactory
)
compilation.dependencyTemplates.set(
webpack.dependencies.ModuleDependency,
new webpack.dependencies.NullDependency.Template()
)
}
)
compiler.hooks.make.tap(PLUGIN_NAME, (compilation: any) => { compiler.hooks.make.tap(PLUGIN_NAME, (compilation: any) => {
compilation.hooks.processAssets.tap( compilation.hooks.processAssets.tap(
{ {
......
...@@ -179,20 +179,6 @@ export class FlightClientEntryPlugin { ...@@ -179,20 +179,6 @@ export class FlightClientEntryPlugin {
} }
apply(compiler: webpack.Compiler) { apply(compiler: webpack.Compiler) {
compiler.hooks.compilation.tap(
PLUGIN_NAME,
(compilation, { normalModuleFactory }) => {
compilation.dependencyFactories.set(
webpack.dependencies.ModuleDependency,
normalModuleFactory
)
compilation.dependencyTemplates.set(
webpack.dependencies.ModuleDependency,
new webpack.dependencies.NullDependency.Template()
)
}
)
compiler.hooks.finishMake.tapPromise(PLUGIN_NAME, (compilation) => compiler.hooks.finishMake.tapPromise(PLUGIN_NAME, (compilation) =>
this.createClientEntries(compiler, compilation) this.createClientEntries(compiler, compilation)
) )
......
...@@ -224,17 +224,7 @@ export class ClientReferenceManifestPlugin { ...@@ -224,17 +224,7 @@ export class ClientReferenceManifestPlugin {
} }
apply(compiler: webpack.Compiler) { apply(compiler: webpack.Compiler) {
compiler.hooks.compilation.tap( compiler.hooks.compilation.tap(PLUGIN_NAME, (compilation) => {
PLUGIN_NAME,
(compilation, { normalModuleFactory }) => {
compilation.dependencyFactories.set(
webpack.dependencies.ModuleDependency,
normalModuleFactory
)
compilation.dependencyTemplates.set(
webpack.dependencies.ModuleDependency,
new webpack.dependencies.NullDependency.Template()
)
compilation.hooks.processAssets.tap( compilation.hooks.processAssets.tap(
{ {
name: PLUGIN_NAME, name: PLUGIN_NAME,
...@@ -244,8 +234,7 @@ export class ClientReferenceManifestPlugin { ...@@ -244,8 +234,7 @@ export class ClientReferenceManifestPlugin {
}, },
(assets) => this.createAsset(assets, compilation, compiler.context) (assets) => this.createAsset(assets, compilation, compiler.context)
) )
} })
)
} }
createAsset( createAsset(
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment