diff --git a/generators/javascript/generators/rsbuild/templates/rsbuild.config.ts.jhi.ejs b/generators/javascript/generators/rsbuild/templates/rsbuild.config.ts.jhi.ejs index 88a633c1ede8..2b51f1cfbc43 100644 --- a/generators/javascript/generators/rsbuild/templates/rsbuild.config.ts.jhi.ejs +++ b/generators/javascript/generators/rsbuild/templates/rsbuild.config.ts.jhi.ejs @@ -22,22 +22,23 @@ importsSection: 0, pluginsSection: 0, configSection: 0, + configsSection: 0, }); _&> import path from 'node:path'; import { fileURLToPath } from 'node:url'; -import { defineConfig } from '@rsbuild/core'; +import { mergeRsbuildConfig } from '@rsbuild/core'; import { getAbsoluteFSPath } from 'swagger-ui-dist'; <&- fragments.importsSection() -&> const __filename = fileURLToPath(import.meta.url); const __dirname = path.dirname(__filename); -export default defineConfig({ +export default mergeRsbuildConfig({ root: path.join(__dirname, '<%- this.relativeDir(clientRootDir, clientSrcDir) %>'), output: { <%_ if (microfrontend) { _%> - publicPath: 'auto', + assetPrefix: 'auto', <%_ } _%> cleanDistPath: true, distPath: { @@ -80,4 +81,6 @@ export default defineConfig({ <&- fragments.pluginsSection() -&> ], <&- fragments.configSection() -&> -}); +}, +<&- fragments.configsSection() -&> +);