You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We use esbuild to bundle, and add the following config in order to load the files as binary
loader: {".png": "binary",},
When trying to run dev server with email dev we get the error src/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!
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
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