[READ-ONLY] Mirror of https://github.com/sxzz/unplugin-glob. Imports or exports files using glob match for ES Module.
README.md

unplugin-glob #

npm version npm downloads Unit Test

Imports or exports files using glob match for ES Module.

Features #

  • ⚡️ Supports Vite, Rollup, and Rolldown, powered by unplugin.
  • 🦾 Full TypeScript support.

Usage #

import * as mods from './some-path/*.js'
console.log(mods.foo)

export * from './some-path/**'

Installation #

npm i -D unplugin-glob
Vite
// 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()],
}


Sponsors #

License #

MIT License © 2025-PRESENT Kevin Deng