Skip to content

Commit

Permalink
fix: set css preload to false (#4524)
Browse files Browse the repository at this point in the history
After dependabot upgraded us to the new version of Vite, we started
having failures on the preloading of CSS modules on certain lazy loaded
modules. After investigation, it seems like Vite was adding another
stylesheet into the head element when the lazy loaded modules were
requested. These stylesheets had the wrong relative path when the assets
were loaded from our CDN. We are not sure why this fails, but for now we
are turning off cssPreloading.

The impact is small, because we have few lazy loaded modules that
preload the CSS.
  • Loading branch information
FredrikOseberg authored Aug 17, 2023
1 parent ac369d4 commit e1ee2f6
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions frontend/vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ export default mergeConfig(
outDir: 'build',
assetsDir: 'static',
modulePreload: false,
cssCodeSplit: false,
},
server: {
open: true,
Expand Down

0 comments on commit e1ee2f6

Please sign in to comment.