Imports or exports files using glob match for ES Module.
- ⚡️ Supports Vite, Rollup, and Rolldown, powered by unplugin.
- 🦾 Full TypeScript support.
import * as mods from './some-path/*.js'
console.log(mods.foo)
export * from './some-path/**'npm i -D unplugin-globVite
// vite.config.ts
import Starter from 'unplugin-glob/vite'
export default defineConfig({
plugins: [Starter()],
})Rollup
// rollup.config.js
import Starter from 'unplugin-glob/rollup'
export default {
plugins: [Starter()],
}Rolldown / tsdown
// rolldown.config.ts / tsdown.config.ts
import Starter from 'unplugin-glob/rolldown'
export default {
plugins: [Starter()],
}MIT License © 2025-PRESENT Kevin Deng