Fix Vite File does not exist (#8527)

This should fix #8491 

https://vite.dev/config/dep-optimization-options
This commit is contained in:
Félix Malfait
2024-11-16 09:04:19 +01:00
committed by GitHub
parent b733a2f3ec
commit 4feb59a369

View File

@ -18,10 +18,12 @@ export default defineConfig(({ command, mode }) => {
VITE_BUILD_SOURCEMAP,
VITE_DISABLE_TYPESCRIPT_CHECKER,
VITE_DISABLE_ESLINT_CHECKER,
REACT_APP_PORT
REACT_APP_PORT,
} = env;
const port = isNonEmptyString(REACT_APP_PORT) ? parseInt(REACT_APP_PORT) : 3001;
const port = isNonEmptyString(REACT_APP_PORT)
? parseInt(REACT_APP_PORT)
: 3001;
const isBuildCommand = command === 'build';
@ -114,6 +116,10 @@ export default defineConfig(({ command, mode }) => {
}),
],
optimizeDeps: {
exclude: ['node_modules/.vite', 'node_modules/.cache'],
},
build: {
outDir: 'build',
sourcemap: VITE_BUILD_SOURCEMAP === 'true',