Nuxt 3 - lodash
💡 About
Lodash auto-import module for Nuxt3, supports custom prefix, list of exludes and list of aliases
📦 Install
npm i nuxt-lodash -D
💻 Usage
import { defineNuxtConfig } from "nuxt3";
export default defineNuxtConfig({
buildModules: [
[
"nuxt-lodash",
{
prefix: "use",
exclude: ["map"],
alias: [
["camelCase", "stringToCamelCase"],
["kebabCase", "stringToKebabCase"],
],
},
],
],
});
🔨 Config
Name | Default | Description |
---|
prefix | false | string to prepend before each function (false to disable) |
exclude | [] | list of functions to exlude from auto-imports |
alias | [] | list of aliases to rename specific functions |
💻 Example
<template>
<div>{{ text }}</div>
</template>
<script setup lang="ts">
const text = useToUpper("it works!");
</script>
📄 License
MIT License © 2021-PRESENT Michal Čípa