Skip to content

Commit

Permalink
fix(module): presets import
Browse files Browse the repository at this point in the history
  • Loading branch information
benjamincanac committed Dec 22, 2021
1 parent 2d31146 commit 97f8f56
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -138,13 +138,13 @@ export default defineNuxtModule<UiOptions>({

const presetsDir = resolve(__dirname, './presets')

let ui: object = await import(resolveModule(`./${defaults.preset}`, { paths: presetsDir }))
let ui: object = (await import(resolveModule(`./${defaults.preset}`, { paths: presetsDir }))).default
try {
if (typeof preset === 'object') {
ui = defu(preset, ui)
} else {
// @ts-ignore
ui = await import(resolveModule(`./${preset}`, { paths: presetsDir }))
ui = (await import(resolveModule(`./${preset}`, { paths: presetsDir }))).default
}
} catch (e) {
// eslint-disable-next-line no-console
Expand Down

1 comment on commit 97f8f56

@vercel
Copy link

@vercel vercel bot commented on 97f8f56 Dec 22, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

Please sign in to comment.