You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The import is added outside the script block (see logs below).
Now, at first I assumed it was up to the me to process the vue file and only transform the <script> block instead of transforming the whole file... but when I looked for examples of how to do that (in the included Vite plugin and unplugin-auto-imports source codes), I couldn't find anything that filtered down to the script block... So I think this is a bug? But it works for Nuxt and sometimes for WXT, so this is probably my fault lol. I'd appreciate being pointed in the right direction if I'm missing something obvious.
Just for the sake of it, I also tried setting addons.vueTemplate: true, but this is the script block, not the template, so it didn't have any effect like I assumed.
Environment
Reproduction
https://github.com/aklinker1/unimport-vue-bug
Describe the bug
The import is added outside the script block (see logs below).
Now, at first I assumed it was up to the me to process the vue file and only transform the
<script>
block instead of transforming the whole file... but when I looked for examples of how to do that (in the included Vite plugin andunplugin-auto-imports
source codes), I couldn't find anything that filtered down to the script block... So I think this is a bug? But it works for Nuxt and sometimes for WXT, so this is probably my fault lol. I'd appreciate being pointed in the right direction if I'm missing something obvious.Additional context
Originally found here in WXT: wxt-dev/wxt#1356 (reply in thread)
Just for the sake of it, I also tried setting
addons.vueTemplate: true
, but this is the script block, not the template, so it didn't have any effect like I assumed.Logs
The text was updated successfully, but these errors were encountered: