vite-plugin-vue2
vite-plugin-vue2 copied to clipboard
`srcset` attribute of img is compiled to `requrie(xxx)` in vite build
I was migrating a vue2/vue-cli project to vite. In the production build, I found this requrie is not defined
error in devtools console.
I find that srcset is handled in @vue/compiler-sfc 's this file it transforms srcset=""
to require("")
, causing the above error. I don't think that's an expected behaviour.
Also in dev mode, using vite-inspect I found there was no such transform