This repository was archived by the owner on Aug 7, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +4
-5
lines changed Expand file tree Collapse file tree 2 files changed +4
-5
lines changed Original file line number Diff line number Diff line change 2323 "." : {
2424 "import" : " ./dist/module.mjs" ,
2525 "require" : " ./dist/module.cjs"
26- },
27- "./lodash" : {
28- "import" : " ./dist/runtime/lodash.mjs"
2926 }
3027 },
3128 "main" : " ./dist/module.cjs" ,
Original file line number Diff line number Diff line change 1- import { addImports , defineNuxtModule } from '@nuxt/kit'
1+ import { addImports , createResolver , defineNuxtModule } from '@nuxt/kit'
22import * as lodash from 'lodash-es'
33import excludeDefaults from './exclude'
44
@@ -57,6 +57,8 @@ export default defineNuxtModule<ModuleOptions>({
5757 upperAfterPrefix : true
5858 } ,
5959 setup ( options , nuxt ) {
60+ const { resolve } = createResolver ( import . meta. url )
61+
6062 const aliasMap = new Map < string , string > ( options . alias )
6163 const excludes = [ ...options . exclude , ...excludeDefaults ]
6264 const prefixSkip = options . prefixSkip ? lodash . isArray ( options . prefixSkip ) ? options . prefixSkip : [ options . prefixSkip ] : [ ]
@@ -66,7 +68,7 @@ export default defineNuxtModule<ModuleOptions>({
6668 const alias = aliasMap . has ( name ) ? aliasMap . get ( name ) ! : name
6769 const prefix = ( ! prefixSkip . some ( key => alias . startsWith ( key ) ) && options . prefix ) || ''
6870 const as = prefix ? prefix + ( options . upperAfterPrefix ? lodash . upperFirst ( alias ) : alias ) : alias
69- addImports ( { name, as, from : 'nuxt-lodash/ lodash' } )
71+ addImports ( { name, as, from : resolve ( './runtime/ lodash') } )
7072 }
7173 }
7274 }
You can’t perform that action at this time.
0 commit comments