vendure-ecommerce/real-world-vendure

Dev Mailbox throws error with .gitkeep file

Draykee opened this issue · 1 comments

While using the dev-mailsbox it appears that the .gitkeep file:
https://github.com/vendure-ecommerce/real-world-vendure/blob/master/static/email/test-emails/.gitkeep

Throws an error in the email plugin:
https://github.com/vendure-ecommerce/vendure/blob/13a4b68800e96df3e6037414a4a5fa60145d0b79/packages/email-plugin/src/dev-mailbox.ts#L88

Possible solutions:

  • (Quick) Document that the .gitkeep file needs to be removed
  • (Better) Add a *.json filename filter to iteration

I wasn't sure if I should add this issue to vendure itself, but the error just appears in this repo.

Thanks for the report. I guess the better option, as you say, is to add filtering by file extension to the dev-mailbox logic. That would handle this issue plus prevent similar problems in future. Would you like to PR that?