Posssibility of using glob for filtering files when previewing #2565
                  
                    
                      andrecavallari
                    
                  
                
                  started this conversation in
                Ideas
              
            Replies: 0 comments
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment
  
        
    
Uh oh!
There was an error while loading. Please reload this page.
-
Goals
Background
I'm currently using React Email in an existing project, which already has it's structure very well defined, but the templates are inside folders, together with other files that supports fetching external data or transforming data, so when I use the preview server, it's going to list every .tsx file inside all folders, so what we did is to create a folder named
previewwith all preview files inside so it wont list files like builder.tsx (wich is the one that builds the template using renderToString) and other files that we don't have preview, and unfortunately at this moment it's not possible to refactor the structure to match the React Email structure.Proposal
Instead of using a
--dirwe could use--globinstead with a glob pattern to list all templates in a specific pattern.Beta Was this translation helpful? Give feedback.
All reactions