Skip to content

Commit 3bf1f50

Browse files
committed
update vite options
1 parent 326a342 commit 3bf1f50

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

vite.config.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,10 @@ const PWAConfig = {
3737

3838
// https://vitejs.dev/config/
3939
export default defineConfig(({ mode }) => ({
40+
optimizeDeps: {
41+
entries: [], // Prevent unnecessary optimization on entry points like react
42+
include: ['react', 'react-dom'], // Ensure react and react-dom are pre-bundled
43+
},
4044
build: {
4145
outDir: './build',
4246
target: 'esnext',

0 commit comments

Comments
 (0)