unjs/unimport

Support for custom template files

Closed this issue · 1 comments

Describe the feature

Vue allows for easily making use of custom template files (SFCs). In Stacks, we are experimenting with .stx files, which, essentially, are *.vue files with access to a bunch of auto-imported APIs.

The issue I am facing is that, as seen in the attached screenshot, onMounted() is an auto-imported API, but it's not accessible inside .stx files. If changed to HelloWorld.vue, it works.

Screenshot 2023-12-30 at 3 48 16 PM

Any tips appreciated, as I am still trying to make sense of it 🙂

Additional information

  • Would you be willing to help implement this feature?

Turns out I forgot the include setting. Silly me, my bad.