0.0.3 • Published 1 year ago
@lewebsimple/nuxt-barrel v0.0.3
Nuxt Barrel
Nuxt module for automatic barrel files.
Features
- ⛰ Named exports from a certain glob pattern become properties of an auto-imported object
- 🔥 HMR of files in the glob pattern
Quick Setup
Install the module to your Nuxt application with one command:
npx nuxi module add @lewebsimple/nuxt-barrel
Configure the auto-imported objects and their respective glob patterns like so:
export default defineNuxtConfig({
barrel: {
myBarrel: ["server/barrel/*.ts"],
},
})
That's it! You can now use myBarrel
in the server space of your Nuxt app ✨