-
Notifications
You must be signed in to change notification settings - Fork 10.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add warning for relative paths in source-filesystem. #6563
Add warning for relative paths in source-filesystem. #6563
Conversation
Deploy preview for using-postcss-sass failed. Built with commit 9afba60 https://app.netlify.com/sites/using-postcss-sass/deploys/5b51036fdd28ef732c118d2f |
Deploy preview for using-drupal ready! Built with commit 9afba60 |
Deploy preview for gatsbygram ready! Built with commit 9afba60 |
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. |
Can we convert relative path to absolute path in plugin instead of forcing user to explicitely provide absolute path? |
Haha great point @pieh yeah, we can safely assume the path is relative from the root of the site. |
That makes sense! This fixes #6367, tested on https://github.com/fabe/test-gatsby-json-image |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
* Add warning for relative paths in source-filesystem. * Fix path instead of warning.
This adds a warning when using
gatsby-source-filesystem
with a relative path. Relative paths work, but fail silently when trying to query images (typeFile
). Related issue: #6367I added this as a warning, should it
panic
instead?