Hi, I asked this in chat and got an answer from @solid bough to create a Vite plugin. My use-case is like this
import { someFunction } from 'some-library'
document.addEventListener('DOMContentLoaded', () => {
someFunction()
})
document.addEventListener('astro:page-load', () => {
someFunction()
})
As you can see, we are running the same function in 2 different events. They both run on page load.
What if I only want to run the astro:page-load if the page has view transitions enabled and ignore the one in DOMContentLoaded? Is it possible?