Skip to content
This repository has been archived by the owner on Jun 22, 2024. It is now read-only.

feat: SSR as it should be #47

Closed
wants to merge 6 commits into from
Closed

feat: SSR as it should be #47

wants to merge 6 commits into from

Conversation

Flowko
Copy link
Member

@Flowko Flowko commented Jun 4, 2024

Ability to just use vue components as normal, so importing or doing any other extra stuff, should work fine out of the box ( if vue supports it, it should work, if not then it wont).
we will be dropping the compiler library as we wont be supporting it anymore.
Note that this doesnt use any custom compiler other than what vue provides, also there might be some limitations in importing vue files on the server side, but its doable.

Related 🔗:

vue-email/vue-email#177

Breaking Changes 🔔:

  • Removed config from module, as now you can create that ur self.
  • Removed nuxt devtools client for now, will rebuild it on the upcoming version with new features
  • Removed Auto imported component, you should import what you need from the library
  • Removed i18n integration, you can set up that as you like
  • Updated component names - removing E prefix
  • Nuxt Library will be removed in favor of letting the main library handle the compoennts, since the nuxt library serves no purpose as it only adds support to rollup using @vitejs/plugin-vue , will be documented for more info

Fixes:

Tests:

Playground:

if you wanna check the new integration, note that its using a new edge package, but that will be changed back to the live version once published
https://github.com/Flowko/nuxt-playground

Changes:

// /api/test.post.ts
import { useRender } from 'vue-email-edge'
import Email from '../../components/Email.vue'

export default defineEventHandler(async (event) => {
  const html = await useRender(Email, {
    userFirstName: 'John',
    loginDevice: 'Chrome on Mac OS X',
    loginLocation: 'Upland, California, United States',
    loginIp: '00.000.00.000',
    loginDate: new Date('September 7, 2022, 10:58 am'),
  })

  return html.html
})

@Flowko Flowko self-assigned this Jun 4, 2024
@Flowko Flowko changed the title chore: updating ssr feat: SSR as it should be Jun 4, 2024
@Flowko Flowko mentioned this pull request Jun 4, 2024
25 tasks
@Flowko Flowko marked this pull request as ready for review June 4, 2024 15:32
@Flowko Flowko marked this pull request as draft June 5, 2024 08:40
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant