unplugin / unplugin-auto-import

Auto import APIs on-demand for Vite, Webpack and Rollup
MIT License
3.31k stars 200 forks source link

Add all exported entities from a module #533

Open silentmantra opened 2 months ago

silentmantra commented 2 months ago

Clear and concise description of the problem

Currently to auto-import all entities from a module I use acorn to get all exports. Couldn't find in the documentation an example of automatic imports of all exported entities from a module

Suggested solution

Instead of manual or scripted listing of all imports needed, add for example

imports: [{ 'module-name': '*'}]

to auto import of all the exported entities from a module

Alternative

No response

Additional context

No response

Validations