Skip to content

Conversation

@ascorbic
Copy link
Contributor

Currently the plugin only supports sites where the gatsby root is in a subdirectory by setting the site base to the subdirectory. This means that the site root can't be the root of a monorepo. This PR changes that, so that the root is calculated relative to the publish dir (which is hard-coded in Gatsby), ensuring that all paths are still correct.

Fixes #271

@netlify
Copy link

netlify bot commented Feb 15, 2022

✔️ Deploy Preview for netlify-plugin-gatsby-demo ready!

🔨 Explore the source changes: 0f1173a

🔍 Inspect the deploy log: https://app.netlify.com/sites/netlify-plugin-gatsby-demo/deploys/620d099efe61a5000745e653

😎 Browse the preview: https://deploy-preview-281--netlify-plugin-gatsby-demo.netlify.app

@ascorbic ascorbic self-assigned this Feb 15, 2022
return new Promise((resolve) => {
// Create a stubbed Gatsby/Express Response object
// onResEnd is the "resolve" cb for this Promise
const res = createResponseObject({ onResEnd: resolve })
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this line be put inside the try block? Just in case it throws.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ehmicky Good spot!

ehmicky
ehmicky previously approved these changes Feb 15, 2022
@kodiakhq kodiakhq bot merged commit ccbec68 into main Feb 16, 2022
@kodiakhq kodiakhq bot deleted the mk/site-root branch February 16, 2022 14:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Plugin does not work for monorepo

3 participants