Ever since Netlify started automatically installing gatsby-adapter-netlify
our custom Template page is being generated as [...].html
instead of index.html
resulting in a 404 when viewing page(s) from built site
The page is created in gatsby-node.js
as follows
const CheckoutPageTemplate = path.resolve(`src/templates/checkout.tsx`)
createPage({
path: process.env.GATSBY_PREFIX_PATH
? `${process.env.GATSBY_PREFIX_PATH}/checkout/`
: "/checkout/",
matchPath: process.env.GATSBY_PREFIX_PATH
? `${process.env.GATSBY_PREFIX_PATH}/checkout/*`
: "/checkout/*",
component: CheckoutPageTemplate,
})
Can resolve this by renaming the […].html file to index.html after generation or locking gatsby to v5.10.0
However, both of these solutions are quite hacky and not ideal in long run