svelte-notifications
svelte-notifications copied to clipboard
Does it support typescript?
I use typescript with Sveltekit and it gives run time error:
Error [ERR_REQUIRE_ESM]: Must use import to load ES Module: .../node_modules/@beyonk/svelte-notifications/index.js
require() of ES modules is not supported.
I get this error even in JS, not TS.
This is a vite thing. You probably need to install it in devDeps, or not devDeps. whatever works.
I find it works with Typescript, but VSCode doesn't like the options
parameter.
notifier.danger('Error saving: ' + error, { persist: true });
VSCode underlines { persist: true}
because I haven't supplied a number for the duration.
I wish there was more control over positioning/styling. I may have to fork this.