vue-email / nuxt

💚 Official Nuxt module for Vue Email. Build email templates with Vue components.
https://vuemail.net/getting-started/nuxt-nitro
MIT License
109 stars 3 forks source link

Throws error of not found email templates when using with Nuxt Layers #4

Closed madebyfabian closed 9 months ago

madebyfabian commented 11 months ago

Hi there! I want to create a Nuxt Layer that holds in a few email templates and the apps consuming this layer should be able to render these templates.

This is currently not possible though. The issue is, that vue-email searches for the ~/emails directory in the root of the consuming apps, not of the original layer app where the ~/emails directory is.

Reproduction

https://github.com/madebyfabian/nuxt-mail-layer-reprod

If you clone this repo, install dependencies and start the playground with pnpm start, you see the effect.

Dave136 commented 10 months ago

@madebyfabian yes, this is issue, i'll solve it as soon possible

madebyfabian commented 10 months ago

@Dave136 Thanks, let me know if I can help 🙏🏻

atinux commented 10 months ago

I think you should loop through the nuxt.options._layers property to check for each layer

madebyfabian commented 10 months ago

Hi @Dave136, unfortunately, this does not work in beta-5.

I see that is the added resolve has been removed here: https://github.com/Dave136/vue-email/commit/0658bf42458af54ea505615bf1860e7b74911694#diff-be7ecc6bc17358942938e025d26bee5e5c3664db77e2be717b644d96d3222172L130 Was this on purpose? I just forked the project locally and even with resolve, it does not work

I am currently working on creating a PR that uses nuxt.options._layers to fix this. But I cannot get it to work. If you want, I can create a WIP PR to work together.

Dave136 commented 10 months ago

@madebyfabian sure!

Flowko commented 9 months ago

added in 0.8.1 please upgrade and let us know