Skip to content

Instantly share code, notes, and snippets.

@mkvlrn-cm42
Created May 28, 2024 21:14
Show Gist options
  • Save mkvlrn-cm42/7baa68626a402d3e68158bc93c299f94 to your computer and use it in GitHub Desktop.
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
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