Vue Email is a JavaScript library designed for crafting email templates using Vue components. While the current stable release is v0.8.11, the project recently underwent a significant rewrite with v1.0.0, aiming for simpler integration where standard Vue components can be used out-of-the-box. The library provides a comprehensive set of email-specific components (e.g., `EHtml`, `EButton`, `ETailwind`) that abstract away the complexities of cross-client email compatibility. Key differentiators include full SSR support (with a dedicated compiler for Node.js, Deno, and Bun), i18n capabilities, integrations with various email providers like Nodemailer, extensive testing against popular email clients, first-class support for Tailwind CSS, and robust TypeScript typing. The project is under active development, with frequent updates, though it's still noted as experimental, and APIs are subject to change. It integrates particularly well with the Nuxt.js ecosystem.
npm install vue-emailVerified import paths — ran on the pinned version, not inferred.
Demonstrates how to define a simple email template using Vue Email components and programmatically render it to HTML and plain text using the `@vue-email/compiler`.
Review the official documentation for v1.0.0 and ensure your component definitions and rendering logic align with the new, simpler approach. Verify component import paths and compiler usage.
Pin your `vue-email` dependency to a specific version (e.g., `"vue-email": "^0.8.x"` or `"vue-email": "~0.8.11"`) and thoroughly test updates before deploying to production environments. Monitor GitHub releases closely.
Ensure you explicitly install `npm install @vue-email/compiler` in addition to `npm install vue-email`. Use the `render` function from `@vue-email/compiler` to process your Vue email components.
Install the compiler: `npm install @vue-email/compiler` or `yarn add @vue-email/compiler`. Verify the import statement: `import { render } from '@vue-email/compiler'`.Ensure you are importing the components as named exports from `vue-email`: `import { EHtml, EBody } from 'vue-email';`. If using a build setup, verify the bundler correctly handles these imports.When using `render` from `@vue-email/compiler`, ensure the component definition is valid and does not rely on global Vue instances that are not available in the rendering environment. If using a `.vue` file, ensure your build process correctly transpiles and makes the component available to the compiler.