gatsbyjs / gatsby

The best React-based framework with performance, scalability and security built in.
https://www.gatsbyjs.com
MIT License
55.13k stars 10.33k forks source link

fix(gatsby-adapter-netlify): support monorepos #39005

Open pieh opened 4 weeks ago

pieh commented 4 weeks ago

Description

DSG/SSR handler was making some assumptions about how it's being mounted in serverless that were not correct when site deployed to Netlify is part of monorepo:

The changes can be tested using canary releases:

gatsby@monorepo-support
gatsby-adapter-netlify@monorepo-support

Tests

Added workflow that run adapters e2e tests with fixture using monorepo setup (first commit is just added monorepo test setup showing it failing lots of adapters e2e test and remaining commits fixed the problems making it pass).

Related Issues

Fixes https://linear.app/netlify/issue/FRA-552/ssr-error-enoent-no-such-file-or-directory-lstat-vartaskcachedata-on