0.0.3 • Published 11 months ago

lodash-imports v0.0.3

Weekly downloads
-
License
MIT
Repository
github
Last release
11 months ago

lodash-imports

Lodash auto import for unplugin-auto-import.

Install

pnpm add lodash-imports -D

Usage

// vite.config.ts
import { defineConfig } from 'vite'

import AutoImport from 'unplugin-auto-import/vite'
import LodashImports from 'lodash-imports'

export default defineConfig({
  plugins: [
    AutoImport({
      imports: [
        'vue',
        // ...
        LodashImports()
      ]
    })
  ]
})

Options

interface LodashImportsOptions {
  /**
   * Has from field
   */
  hasFrom?: boolean

  /**
   * Prefix for lodash imports
   */
  prefix?: string

  /**
   * Uppercase the first letter after the prefix
   */
  upperAfterPrefix?: boolean

  /**
   * Exclude keys from lodash
   */
  exclude?: (string | RegExp)[]
}

Acknowledgement

0.0.3

11 months ago

0.0.2

11 months ago

0.0.1

11 months ago