react-email
react-email copied to clipboard
Export fails if multiple files have the same name but different suffixes
Describe the Bug
When exporting with npm run export, the export filenames discard any suffix and not only the last part of the file extension, i.e.
MyEmailFile.jsx -> out/MyEmailFile.html (obviously, duh)
MyEmailFile.en.jsx -> out/MyEmailFile.html (conflict with the export above)
MyEmailFile.de.jsx -> out/MyEmailFile.html (conflict with the exports above)
I know, this isn't a bug per se but more a matter of taste, but to me it makes more sense to use everything except the last extension suffix as the filename since combined extensions (like filename.ext.gz for gzip-compression) don't appear often the context of this project. Also, it's weird that there's a distinction between the two files before the building step (e.g. in the dev server) but not afterwards.
Which package is affected (leave empty if unsure)
No response
Link to the code that reproduces this issue
None, as it is a request regarding the CLI
To Reproduce
- Create a multiple files called the same except for the suffixes (e.g.
MyEmail.en.jsxandMyEmail.de.jsx) - Try to export it using the CLI
- Result will be a naming conflict
Expected Behavior
That the suffixes of the filenames will be preserved.
What's your node version? (if relevant)
21.2.0