diff --git a/projects/rsbuild-ts/rsbuild.config.ts b/projects/rsbuild-ts/rsbuild.config.ts index 8ab8318..31d62dc 100644 --- a/projects/rsbuild-ts/rsbuild.config.ts +++ b/projects/rsbuild-ts/rsbuild.config.ts @@ -5,6 +5,10 @@ export default defineConfig({ favicon: './assets/favicon-128x128.png', title: 'maxGraph Rsbuild TypeScript example', }, + output: { + // ensure assets are correctly loaded when the application is not at the root of the server, for examples when it is deployed on GitHub pages. + assetPrefix: 'auto', + } // enforce a chunk per module to better track the size of the maxGraph chunk. // We don't need it here because we have a single dependency, so the chunk automatically generated only includes the maxGraph module. // In addition, this also split chunks for the CSS files, which is not what we want (at least for now).