diff --git a/.changeset/metal-seals-play.md b/.changeset/metal-seals-play.md new file mode 100644 index 00000000..2c58e5d7 --- /dev/null +++ b/.changeset/metal-seals-play.md @@ -0,0 +1,5 @@ +--- +'@rsdoctor/core': patch +--- + +fix(rspack): rspack loader analysis error diff --git a/packages/core/src/inner-plugins/plugins/loader.ts b/packages/core/src/inner-plugins/plugins/loader.ts index 98a42c61..bbc71bcc 100644 --- a/packages/core/src/inner-plugins/plugins/loader.ts +++ b/packages/core/src/inner-plugins/plugins/loader.ts @@ -53,7 +53,7 @@ export class InternalLoaderPlugin< (callback: Function) => (loaderContext: LoaderContext, module: NormalModule) => { // loaders which are already intercepted in afterPlugins hook by Rsdoctor. - const proxyLoaders = module.loaders || []; + const proxyLoaders = module.loaders || loaderContext?.loaders || []; // return origin loaders not doctor internal loaders const originLoaders = proxyLoaders.map((loader) => {