Closed vim-usds closed 1 year ago
My config file was wrong, using this config file works better:
const config: GatsbyConfig = {
:
:
jsxRuntime: `automatic`,
pathPrefix: `/blog`, //added this
};
Followed by gatsby build --prefix-paths
That's awesome, Vim! Glad that you like the project and plan to use it at USDS!
@jpedroschmitz
Gratitude
First of all thank you for the awesome repo! I'm hoping it can be used for upcoming projects at USDS.
Motivation
During the CI/CD pipeline, we needed to change the
pathPrefix
. Gatsby talks about a way to do that here.How to reproduce
I cloned this repo and made the following changes:
In
gatsby-config.ts
:✅ ran
gatsby build --prefix-paths
with no errors:I would have expected the pages to have updated with the prefix here ❓
✅ ran
gatsby serve --prefix-paths
with no errors:When I attempt to navigate to the localhost at port 9000, the app loads, however, when attempting to go to
/blog
the page is not found.gatsby start
,gatsby build
both work great without the--prefix-paths
flag.What I tried
What I plan to try next
Any ideas would be awesome! Thank you!