Skip to content

Commit

Permalink
fix: ensure compatibility with CommonJS module for izitoast
Browse files Browse the repository at this point in the history
  • Loading branch information
stephenjason89 committed Jan 23, 2025
1 parent fd6bf88 commit 73bef5b
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/runtime/plugin.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
import type { IziToastSettings } from 'izitoast'
import iziToast from 'izitoast'
import type Toast from './types/IziToast.ts'
import 'izitoast/dist/css/iziToast.min.css'
import { defineNuxtPlugin } from '#app'

export default defineNuxtPlugin(() => {
export default defineNuxtPlugin(async () => {
const iziToastModule = await import('izitoast')
const iziToast = iziToastModule.default || iziToastModule
const THEMES = {
info: { color: 'blue', icon: 'ico-info' },
success: { color: 'green', icon: 'ico-success' },
Expand Down

0 comments on commit 73bef5b

Please sign in to comment.