Skip to content

Conversation

@fabe
Copy link
Contributor

@fabe fabe commented Jul 19, 2018

This adds a warning when using gatsby-source-filesystem with a relative path. Relative paths work, but fail silently when trying to query images (type File). Related issue: #6367

I added this as a warning, should it panic instead?

@KyleAMathews
Copy link
Contributor

KyleAMathews commented Jul 19, 2018

Deploy preview for using-postcss-sass failed.

Built with commit 9afba60

https://app.netlify.com/sites/using-postcss-sass/deploys/5b51036fdd28ef732c118d2f

@gatsbybot
Copy link
Collaborator

gatsbybot commented Jul 19, 2018

Deploy preview for using-drupal ready!

Built with commit 9afba60

https://deploy-preview-6563--using-drupal.netlify.com

@gatsbybot
Copy link
Collaborator

gatsbybot commented Jul 19, 2018

Deploy preview for gatsbygram ready!

Built with commit 9afba60

https://deploy-preview-6563--gatsbygram.netlify.com

@KyleAMathews
Copy link
Contributor

Thanks for jumping on a fix! Yeah, this should just hard error since the plugin won't work otherwise and it's an easy fix for people.

@pieh
Copy link
Contributor

pieh commented Jul 19, 2018

Can we convert relative path to absolute path in plugin instead of forcing user to explicitely provide absolute path?

@KyleAMathews
Copy link
Contributor

Haha great point @pieh yeah, we can safely assume the path is relative from the root of the site.

@fabe
Copy link
Contributor Author

fabe commented Jul 19, 2018

That makes sense! This fixes #6367, tested on https://github.com/fabe/test-gatsby-json-image

Copy link
Contributor

@KyleAMathews KyleAMathews left a comment

Choose a reason for hiding this comment

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

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants