Description
Hi, I’m trying to add the following script to the section of my Vite project, but I’m not sure where to place it properly.
<script>
;(function () {
const prefersDark = window.matchMedia && window.matchMedia('(prefers-color-scheme: dark)').matches
const setting = localStorage.getItem('vueuse-color-scheme') || 'auto'
if (setting === 'dark' || (prefersDark && setting !== 'light'))
document.documentElement.classList.toggle('dark', true)
})()
</script>
Description
Hi, I’m trying to add the following script to the section of my Vite project, but I’m not sure where to place it properly.