diff --git a/modules/public/manifest.go b/modules/public/manifest.go index 15fa8f16766..a99704bf3c6 100644 --- a/modules/public/manifest.go +++ b/modules/public/manifest.go @@ -142,17 +142,19 @@ func AssetURI(srcPath string) string { // AssetCSSLinks renders the tags for a JS entry's stylesheets: the entry's CSS plus the CSS // of every statically-imported chunk. Dev links devStylesheetSrc and lets the JS module inject the rest. func AssetCSSLinks(jsEntrySrc, devStylesheetSrc string) template.HTML { + if IsViteDevMode() { + // data-vite-dev-id makes Vite's HMR client skip injecting a duplicate