diff --git a/cli/send.ts b/cli/send.ts index 832ed2f..6ec7b5b 100644 --- a/cli/send.ts +++ b/cli/send.ts @@ -4,6 +4,7 @@ import { Contact } from '../src/contact.ts' import { send } from '../src/send.ts' import type { Mail, Template } from '../types.ts' import type { JSX } from 'preact' +import { fromFileUrl } from '@std/path' const templates: Map< string, @@ -13,7 +14,8 @@ const templates: Map< > > = new Map() -const templatesDir = import.meta.resolve('../templates').slice('file://'.length) +const templatesDirUrl = import.meta.resolve('../templates') +const templatesDir = fromFileUrl(templatesDirUrl) //Load templates dynamicaly for await (