Quick question: Anyone else have issues with nuxt-lodash not auto-importing in Nuxt 4 compatibility?
I am just beginning to debug this issue. Lodash functions are not being auto-imported for me. I'm using compatibilityVersion: 4, but that may not be the problem. I will update this post as I get more information and/or figure out the problem. Thanks.
3 Replies
The documentation is incorrect for the (latest version?) of the Nuxt Lodash module. In the documentation is says the 'use' prefix is enabled by default, but in fact it is not. I was trying to use 'useIsEmpty' in my components, but 'isEmpty' is what is working by default. However, in a plugin I did have to use 'useKebabCase' rather than 'kebabCase'. Hopefully this won't break with an update later. I will post an issue in the Nuxt Lodash module GitHub repo about this.
Methods beginning with
is
are not prefixed by default, as per docs.Ok, that's frustrating lol. Thank you. I think the docs could be clearer about that since the only example they give is one using the prefix and do not callout the other default behavior for skipping the 'is' prefix. I will put in a PR for the docs