Skip to content
This repository was archived by the owner on May 10, 2021. It is now read-only.

Conversation

etrepum
Copy link
Contributor

@etrepum etrepum commented Jun 12, 2020

Previously, the / route having associated data would cause the
build to fail as it would attempt to reference an /.html file
instead of /index.html

This also fixes a stability issue with the snapshot test for
_redirects, which are not necessarily generated in a stable order.

Previously, the / route having associated data would cause the build to fail as it would attempt to reference an /.html file instead of /index.html This also fixes a stability issue with the snapshot test for _redirects, which are not necessarily generated in a stable order.
@FinnWoelm
Copy link
Contributor

Hi @etrepum,

This is fantastic! Thank you for not only reporting the bug, but also diving into the code and fixing it. I really appreciate it 🙌

I've pulled the branch and am merging it locally right now (there is a minor conflict with the test snapshot). Will publish new version of next-on-netlify asap!

Cheers,
Finn

@FinnWoelm FinnWoelm merged commit 38f8fed into netlify:master Jun 14, 2020
FinnWoelm added a commit that referenced this pull request Jun 14, 2020
- Add support for [NextJS optional catch-all routes]( https://nextjs.org/docs/api-routes/dynamic-api-routes#optional-catch-all-api-routes ) ([#15](#15)) - Fix: An `index.js` page with `getStaticProps` no longer causes `next-on-netlify` to fail ([#18](#18)) - Fix: Catch-all routes now correctly require that at least one URL parameter is present (unlike optional catch-all routes) ([479b7e7](479b7e7)) - Fix: Data routes now correctly work for pages with catch-all routing ([0412b45](0412b45))
@FinnWoelm
Copy link
Contributor

I just merged and published it (next-on-netlify v2.1.0). 🚀

I removed the part about the stability issue with the snapshot test because the order of the redirects is important. For example, more specific routes must come before less specific ones: /pages/abc > /pages/[id] > /pages/[...id]

But I hear your point about the instability of it and I will look into it — perhaps there's a solution that avoids the instability in the first place!

Thank you again for your contribution, @etrepum 🙂
- Finn

PS: Let me know if you build something awesome with next-on-netlify — I would love to feature some projects in the README.

@etrepum
Copy link
Contributor Author

etrepum commented Jun 14, 2020

We're working on moving our https://donate.missionbit.org/ donation portal from a standalone Flask site deployed on Azure into our new next.js site for https://www.missionbit.org/ deployed on Netlify.

The source for the project is here: https://github.com/missionbit/missionbit.org

Technically it's already using my branch of next-on-netlify, but it's still in a state where the output is indistinguishable from next export because there aren't any API routes yet.

FinnWoelm added a commit that referenced this pull request Jun 22, 2020
missionbit.org uses next-on-netlify, so let's feature it in the README! For details, see: #18 (comment)
@FinnWoelm
Copy link
Contributor

That's an amazing site and incredible work you're doing! Super happy to have it featured in the README now: https://github.com/FinnWoelm/next-on-netlify#showcase 😊

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
2 participants