diff --git a/packages/backend/src/helpers/compile-email.ee.js b/packages/backend/src/helpers/compile-email.ee.js index 3fd7fb4e..ae866a36 100644 --- a/packages/backend/src/helpers/compile-email.ee.js +++ b/packages/backend/src/helpers/compile-email.ee.js @@ -1,6 +1,9 @@ -import * as path from 'path'; -import * as fs from 'fs'; -import * as handlebars from 'handlebars'; +import path from 'path'; +import fs from 'fs'; +import handlebars from 'handlebars'; +import { fileURLToPath } from 'url'; + +const __dirname = path.dirname(fileURLToPath(import.meta.url)); const compileEmail = (emailPath, replacements = {}) => { const filePath = path.join(__dirname, `../views/emails/${emailPath}.ee.hbs`);