Skip to content

Commit

Permalink
perf: call module.enableCompileCache() (#18323)
Browse files Browse the repository at this point in the history
  • Loading branch information
sapphi-red authored Oct 10, 2024
1 parent 67783b2 commit 18f1dad
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions packages/vite/bin/vite.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#!/usr/bin/env node
import { performance } from 'node:perf_hooks'
import module from 'node:module'

if (!import.meta.url.includes('node_modules')) {
try {
Expand Down Expand Up @@ -41,6 +42,9 @@ if (debugIndex > 0) {
}

function start() {
try {
module.enableCompileCache?.()
} catch {}
return import('../dist/node/cli.js')
}

Expand Down

0 comments on commit 18f1dad

Please sign in to comment.