Improve twenty-front build performance (vite rollup option) (#10771)
In this PR, I'm specifying to vite build that '@scalar/api-reference-react' is an external dependency and should not be considered as a module we maintain (it won't get its own chunk at build time and we won't generate sourcemaps on our end). I'm not sure why vite is considering it internal in the first place (I can see that it's generating .vue.js files, might be the first time we are relying on a vue library)
This commit is contained in:
@ -145,6 +145,9 @@ export default defineConfig(({ command, mode }) => {
|
||||
build: {
|
||||
outDir: 'build',
|
||||
sourcemap: VITE_BUILD_SOURCEMAP === 'true',
|
||||
rollupOptions: {
|
||||
external: ['@scalar/api-reference-react'],
|
||||
},
|
||||
},
|
||||
|
||||
envPrefix: 'REACT_APP_',
|
||||
|
||||
Reference in New Issue
Block a user