Replies: 4 comments
-
I wanted to load translation (.po) files, and I got the same error. |
Beta Was this translation helpful? Give feedback.
-
I ended up using esbuild to "pre-bundle" the images into binary and export them in a generated |
Beta Was this translation helpful? Give feedback.
-
I simpathze with the idea of the preview server being configurable somehow, but I'm not sure how we can interface this in a way that doesn't feel annoying to users, like having a configuration of our own just for this. There's some other use cases for this sort of configuration too, like getting environment variables from inside the preview |
Beta Was this translation helpful? Give feedback.
-
I'm not clear on the Image component behavior in React-email? does it auto-inline images as inline attachments? or are we supposed to host the images somewhere (and how do we configure the base url?) |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Hello, big fan of react-email! Thanks for all you do.
We load some png files as binary to load as attachments, example:
We use esbuild to bundle, and add the following config in order to load the files as binary
When trying to run dev server with
email dev
we get the errorsrc/attachments/index.ts:2:22: ERROR: No loader is configured for ".png" files: src/attachments/my-image.png
Is there any workaround for this? Or is there a way to set options for the esbuild command used under the hood by react-email cli?
This comment thread has similar question: #1403 (reply in thread). I think reading the file using node would work for dev env but then I would have to dynamically swap out which attachments I'm referencing based on whether I'm running local dev server or not. Curious what other options there may be. Thanks!
Beta Was this translation helpful? Give feedback.
All reactions