Created
May 28, 2024 21:14
-
-
Save mkvlrn-cm42/7baa68626a402d3e68158bc93c299f94 to your computer and use it in GitHub Desktop.
workaround for importing mantine extensions (such as @mantine/notifications) in a pure esm, vite project and get types working
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { Notification } from 'node_modules/@mantine/notifications/lib/Notifications.d.ts'; | |
import { notifications } from 'node_modules/@mantine/notifications/lib/notifications.store.d.ts'; | |
declare module '@mantine/notifications' { | |
export = { Notification, notifications }; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment