Regression bugs after updating from 2.2.1 to 2.2.6
kgkg opened this issue · 2 comments
kgkg commented
Describe the bug
After updating remix-sitemap from 2.2.1 to 2.2.6 and refreshing runtime generation of sitemap.xml there 2 differences since version 2.2.1.
- entry for index path (http://localhost:3000) is missing
- paths like
_layout.contact.tsx
without exportedsitemap
const used to be generated properly likehttp://localhost:3000/contact
. After update they're being generated ashttp://localhost:3000/undefined/contact
.
To Reproduce
Steps to reproduce the behavior:
- Create
routes/_layout.tsx
with content (not sure if this is nessesasary)
export default function LayoutWithData() {
const outletData = useOutletContext<{}>();
return (
<div>
<Outlet context={outletData} />
</div>
);
}
- Create
routes/_layout._index.tsx
with any component code. - Create
routes/_layout.contact.tsx
with any component code. - Initialize sitemap in
entry.server.tsx
as described in remix-sitemap docs. - Open sitemap.xml
Expected behavior
In generated sitemap there should be entry for main path and correct entries for top-level routes.
Screenshots
If applicable, add screenshots to help explain your problem.
Desktop (please complete the following information):
- OS: MacOS latest
- Firefor/Chrome latest
Additional context
Add any other context about the problem here.