0.0.3 • Published 1 year ago

@lewebsimple/nuxt-barrel v0.0.3

Weekly downloads
-
License
MIT
Repository
github
Last release
1 year ago

Nuxt Barrel

npm version npm downloads License Nuxt

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 ✨

Contribution