Skip to content

Commit

Permalink
correctly load assets when app not deployed in the root context of th…
Browse files Browse the repository at this point in the history
…e server
  • Loading branch information
tbouffard committed Aug 18, 2024
1 parent a59a104 commit 01bb7d6
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions projects/rsbuild-ts/rsbuild.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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).
Expand Down

0 comments on commit 01bb7d6

Please sign in to comment.