Open CDBridger opened 2 years ago
Hi, I think you don't need to config the layout as option.
ERROR #11902 COMPILATION
We encountered an error while trying to compile your site's gatsby-config. Please fix the error and try again.
Error: Cannot find module '@reach/router'
Require stack:
- _SNIP-\project-root\.cache\compiled\gatsby-config.js
Here compiler asked for @reach/router. So, you have to install this first.
As far I can advise...you can use GatsbySEO for SEO in particular page which is another useful plugin I have used in one of my Gatsby Project. This may not hamper your page transition I think.
I need to pass a layout so that It doesn't transition my layout file (which had also included my SEO, which is a slight red herring, I was just demonstrating what steps I had taken to try and get it to work). I just want the content of my pages to transition, not the header and footer too (which are in my layout file). This use case is exactly what the layout config is for clearly documented here, which does not work for me, which is why this issue was raised.
When I add this to my gatsby-config file
I get errors at the compile step
Here is my layout file
so then I removed the layout CSS file and I got
which would be due to the SEO component I have in my layout ( I use the useLocation hook to get current path). So I remove the SEO component and I get.
here are my dependencies
am I doing something wrong? Is this plugin still supported? Is there another way of excluding my layout tsx from the page animations?
EDIT: I just noticed a typo in this post, I removed the CSS import FROM the layout TSX file, not the layout tsx file itself.