lodash-imports
v0.0.3
Published
Lodash auto import options
Downloads
44
Maintainers
Readme
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)[]
}