From 07d68d0a400293aa00fc599d2b39576db8eb7b79 Mon Sep 17 00:00:00 2001 From: yifancong Date: Tue, 23 Apr 2024 19:50:33 +0800 Subject: [PATCH] fix: multi plugin rspack output path error (#315) --- packages/rspack-plugin/src/plugin.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/packages/rspack-plugin/src/plugin.ts b/packages/rspack-plugin/src/plugin.ts index c6452a34..5c63f43e 100644 --- a/packages/rspack-plugin/src/plugin.ts +++ b/packages/rspack-plugin/src/plugin.ts @@ -11,6 +11,7 @@ import { ensureModulesChunksGraphFn, InternalBundlePlugin, InternalRulesPlugin, + getSDK, } from '@rsdoctor/core/plugins'; import type { RsdoctorPluginInstance, @@ -134,7 +135,9 @@ export class RsdoctorRspackPlugin ManifestType.RsdoctorManifestClientRoutes.Overall, ]); - this.sdk.setOutputDir( + const _sdk = getSDK(compiler.build.name); + + _sdk.setOutputDir( path.resolve(compiler.outputPath, `./${Constants.RsdoctorOutputFolder}`), ); await this.sdk.writeStore();