Something went wrong. Try again.
[READ-ONLY] Mirror of https://github.com/sxzz/unplugin-glob. Imports or exports files using glob match for ES Module.
Something went wrong. Try again.
Files
- TypeScript 98%
- JavaScript 2%
README.md
unplugin-glob #
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