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

check routes incompatible with optional path segments and pathless layout routes #749

Closed
duncan-fairley opened this issue Apr 1, 2023 · 2 comments · Fixed by #774
Closed

Comments

@duncan-fairley
Copy link
Contributor

What is the location of your example repository?

https://github.com/DuncanFa/hydrogen-paths

Which package or tool is having this issue?

CLI

What version of that package or tool are you using?

3.29.0

What version of Remix are you using?

1.14.0

Steps to Reproduce

  1. Clone https://github.com/DuncanFa/hydrogen-paths
  2. Inside project run yarn followed by yarn build
  3. Run yarn shopify hydrogen check routes

Expected Behavior

warning 

Standard Shopify routes missing                                                                                                           
                                                                                                                                        
Your Hydrogen project is missing 16 standard Shopify routes.                                                                              
Including these routes improves compatibility with Shopify’s platform:                                                                    
                                                                                                                                                                                                                                              
• /sitemap.xml                                                                                                                            
• /robots.txt                                                                                                                             
• /pages/:pageHandle                                                                                                                      
• /policies/:policyHandle                                                                                                                 
• /search                                                                                                                                 
• /discount/:discountCode                                                                                                                 
• /account                                                                                                                                
• /account/login                                                                                                                          
• /account/register                                                                                                                       
• /account/orders/:orderId                                                                                                                
• /account/reset/:id/:token                                                                                                               
• /account/activate/:id/:token      

Actual Behavior

warning 

Standard Shopify routes missing                                                                                                           
                                                                                                                                        
Your Hydrogen project is missing 16 standard Shopify routes.                                                                              
Including these routes improves compatibility with Shopify’s platform:                                                                    
                                                                                                                                        
• /products                                                                                                                               
• /products/:productHandle                                                                                                                
• /collections                                                                                                                            
• /collections/:collectionHandle                                                                                                          
• /sitemap.xml                                                                                                                            
• /robots.txt                                                                                                                             
• /pages/:pageHandle                                                                                                                      
• /policies/:policyHandle                                                                                                                 
• /search                                                                                                                                 
• /discount/:discountCode                                                                                                                 
• /account                                                                                                                                
• /account/login                                                                                                                          
• /account/register                                                                                                                       
• /account/orders/:orderId                                                                                                                
• /account/reset/:id/:token                                                                                                               
• /account/activate/:id/:token      
@frandiox
Copy link
Contributor

Thanks for the report and the reproduction!

I think pathless layout routes actually work in general. It doesn't in your repro because it's also nested in an optional segment.
I'm adding support for optional segments in #774 👍

@duncan-fairley
Copy link
Contributor Author

Thanks @frandiox! Nice work

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants