Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add glob-import-esbuild-plugin #191

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Simonpedro
Copy link

@Simonpedro Simonpedro commented Jul 5, 2024

  • This plugin allows importing multiple modules by using a glob pattern, e.g components/**/*_component.js.
  • The import result is similar to Vite's import.meta.glob one: It returns an object where the key is the module path, and the value are the exports (both named and default exports).
  • There is a similar plugin already listed (esbuild-plugin-import-glob) but doesn't work without a default export, and the import result is quite different (returns an array of the module's exports, which makes it harder to know which module belongs to which path).

Thank you!

@Simonpedro
Copy link
Author

Hi @evanw, any chance this will be merged?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant