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

Route splitting on pods found under ./app/routes/ #1533

Closed
evoactivity opened this issue Jul 14, 2023 · 2 comments · Fixed by #1534
Closed

Route splitting on pods found under ./app/routes/ #1533

evoactivity opened this issue Jul 14, 2023 · 2 comments · Fixed by #1534

Comments

@evoactivity
Copy link
Contributor

evoactivity commented Jul 14, 2023

Repro repo: https://github.com/evoactivity/embroider-route-split-pods-routes-dir

When pods are found in the ./app/routes/ directory by setting podModulePrefix to my-app/routes and they are route split the routes do not load with no runtime or build errors.

@ef4
Copy link
Contributor

ef4 commented Jul 14, 2023

I think all that is needed to fix this case is re-ordering the calls to the classic and pods implementations here:

this.handleClassicRouteFile(relativePath) ||
(podModulePrefix !== undefined && this.handlePodsRouteFile(relativePath, podModulePrefix))

Settings podsModulePrefix to my-app/routes means that your route files also match the classic route files handling, and since that gets tried first it doesn't ever try to do the pod-specific handling.

@evoactivity
Copy link
Contributor Author

I tried a quick patch to app-files.js in my node_modules to confirm and it does indeed fix this case.

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