yuanchuan / sveltekit-autoimport

Automatically detect and import components/modules for SvelteKit projects
https://npm.im/sveltekit-autoimport
MIT License
228 stars 11 forks source link

Support for auto-import inside <script context="module"> #26

Open Refzlund opened 2 years ago

Refzlund commented 2 years ago

I think one would just expect it to work there as-well. In my case, I was doing export const id = derived(page, $page => $page.url.searchParams.get('id')) *The import doesn't have to be inside the modules script-tag.

So I guess it could be included the checking phase of the script tag?🤔