Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Export fails if multiple files have the same name but different suffixes #1386

Open
bliepp opened this issue Mar 27, 2024 · 0 comments
Open
Assignees
Labels
Package: react-email This is the CLI we generally use as just `email` on the temrinal. Type: Bug Confirmed bug

Comments

@bliepp
Copy link

bliepp commented Mar 27, 2024

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

  1. Create a multiple files called the same except for the suffixes (e.g. MyEmail.en.jsx and MyEmail.de.jsx)
  2. Try to export it using the CLI
  3. 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

@bliepp bliepp added the Type: Bug Confirmed bug label Mar 27, 2024
@gabrielmfern gabrielmfern added the Package: react-email This is the CLI we generally use as just `email` on the temrinal. label Mar 27, 2024
@gabrielmfern gabrielmfern self-assigned this Jul 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Package: react-email This is the CLI we generally use as just `email` on the temrinal. Type: Bug Confirmed bug
Projects
None yet
Development

No branches or pull requests

2 participants