This commit is contained in:
parent
69386eed63
commit
cf509360e6
1 changed files with 10 additions and 0 deletions
|
|
@ -66,6 +66,16 @@ export default defineConfig({
|
|||
dangerouslyProcessSVG: true,
|
||||
},
|
||||
vite: {
|
||||
// Pre-bundle the analytics tracker during dev server startup. It is only
|
||||
// referenced from a client `<script>`, so Vite would otherwise discover it
|
||||
// lazily on the first page request, re-optimize, and trigger a full reload.
|
||||
// That reload makes already-optimized deps (including the dev toolbar's
|
||||
// runtime) return 504 "Outdated Optimize Dep", which breaks the Astro Dev
|
||||
// Toolbar that the audit relies on. Listing it here optimizes it up front
|
||||
// so the first navigation is stable.
|
||||
optimizeDeps: {
|
||||
include: ['@plausible-analytics/tracker'],
|
||||
},
|
||||
server: {
|
||||
watch: {
|
||||
// Avoid inotify instance limits in dev containers and mounted volumes.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue