From 75e862c3104ef6942a067e09ff1d2b1e6e4753fa Mon Sep 17 00:00:00 2001 From: hypercross Date: Sat, 11 Jul 2026 09:27:57 +0800 Subject: [PATCH] feat: treat doc-entries markdown files as asset/source --- rsbuild.config.ts | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/rsbuild.config.ts b/rsbuild.config.ts index 0da0e06..a714e9d 100644 --- a/rsbuild.config.ts +++ b/rsbuild.config.ts @@ -18,6 +18,15 @@ export default defineConfig({ }, }, rspack: { + module: { + rules: [ + { + // Built-in doc entries are statically imported as strings + test: /[\\/]doc-entries[\\/].*\.md$/, + type: "asset/source", + }, + ], + }, plugins: [ process.env.ANALYZE ? new BundleAnalyzerPlugin() : undefined, ].filter(Boolean),