@@ -23,7 +23,8 @@ import {
2323import {
2424 HtmlRspackPlugin ,
2525 JavascriptModulesPlugin ,
26- JsLoaderRspackPlugin
26+ JsLoaderRspackPlugin ,
27+ RsdoctorRspackPlugin
2728} from "./builtin-plugin" ;
2829
2930import { Chunk } from "./Chunk" ;
@@ -769,7 +770,7 @@ class Compiler {
769770 this . #compilation = undefined ;
770771 // ensure thisCompilation must call
771772 this . hooks . thisCompilation . intercept ( {
772- call : ( ) => { }
773+ call : ( ) => { }
773774 } ) ;
774775 }
775776
@@ -1445,8 +1446,8 @@ class Compiler {
14451446 ) {
14461447 const data = bindingData
14471448 ? ContextModuleFactoryBeforeResolveData . __from_binding (
1448- bindingData
1449- )
1449+ bindingData
1450+ )
14501451 : false ;
14511452 const result = await queried . promise ( data ) ;
14521453 return result
@@ -1472,8 +1473,8 @@ class Compiler {
14721473 ) {
14731474 const data = bindingData
14741475 ? ContextModuleFactoryAfterResolveData . __from_binding (
1475- bindingData
1476- )
1476+ bindingData
1477+ )
14771478 : false ;
14781479 const result = await queried . promise ( data ) ;
14791480 return result
@@ -1626,7 +1627,59 @@ class Compiler {
16261627 } ) ;
16271628 } ;
16281629 }
1629- )
1630+ ) ,
1631+ registerRsdoctorPluginModuleGraphTaps : this . #createHookRegisterTaps(
1632+ binding . RegisterJsTapKind . RsdoctorPluginModuleGraph ,
1633+ function ( ) {
1634+ return RsdoctorRspackPlugin . getCompilationHooks (
1635+ that . deref ( ) ! . #compilation!
1636+ ) . moduleGraph ;
1637+ } ,
1638+ function ( queried ) {
1639+ return async function ( data : binding . JsRsdoctorModuleGraph ) {
1640+ return await queried . promise ( data ) ;
1641+ } ;
1642+ }
1643+ ) ,
1644+ registerRsdoctorPluginChunkGraphTaps : this . #createHookRegisterTaps(
1645+ binding . RegisterJsTapKind . RsdoctorPluginChunkGraph ,
1646+ function ( ) {
1647+ return RsdoctorRspackPlugin . getCompilationHooks (
1648+ that . deref ( ) ! . #compilation!
1649+ ) . chunkGraph ;
1650+ } ,
1651+ function ( queried ) {
1652+ return async function ( data : binding . JsRsdoctorChunkGraph ) {
1653+ return await queried . promise ( data ) ;
1654+ } ;
1655+ }
1656+ ) ,
1657+ registerRsdoctorPluginModuleSourcesTaps : this . #createHookRegisterTaps(
1658+ binding . RegisterJsTapKind . RsdoctorPluginChunkGraph ,
1659+ function ( ) {
1660+ return RsdoctorRspackPlugin . getCompilationHooks (
1661+ that . deref ( ) ! . #compilation!
1662+ ) . moduleSources ;
1663+ } ,
1664+ function ( queried ) {
1665+ return async function ( data : binding . JsRsdoctorModuleSource [ ] ) {
1666+ return await queried . promise ( data ) ;
1667+ } ;
1668+ }
1669+ ) ,
1670+ registerRsdoctorPluginAssetsTaps : this . #createHookRegisterTaps(
1671+ binding . RegisterJsTapKind . RsdoctorPluginAssets ,
1672+ function ( ) {
1673+ return RsdoctorRspackPlugin . getCompilationHooks (
1674+ that . deref ( ) ! . #compilation!
1675+ ) . assets ;
1676+ } ,
1677+ function ( queried ) {
1678+ return async function ( data : binding . JsRsdoctorAsset [ ] ) {
1679+ return await queried . promise ( data ) ;
1680+ } ;
1681+ }
1682+ ) ,
16301683 } ;
16311684
16321685 this . #instance = new instanceBinding . Rspack (
0 commit comments