Fix Scalar preload (#12184)

Chrome doesn't really respect preloading and was loading it before other
important assets, slowing down the app while in 99% of sessions people
don't check the REST API playground
This commit is contained in:
Félix Malfait
2025-05-21 15:27:46 +02:00
committed by GitHub
parent 5c16b2752d
commit 8c20bada79

View File

@ -170,6 +170,11 @@ export default defineConfig(({ command, mode }) => {
},
},
},
modulePreload: {
resolveDependencies: (filename, deps, { hostId }) => {
return deps.filter(dep => !dep.includes('scalar'));
},
},
},
envPrefix: 'REACT_APP_',