You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* warning spacing
* warn about corrupt files and skip over to the next one
* Update gatsby-node.js
* Only register gatsby image support when skipFileDownloads option is enabled
* add [gatsby-source-drupal] to errors
`[gatsby-source-drupal]\nNo Gatsby Image CDN placeholder style found. Please ensure that you have a placeholder style in your Drupal site for the fastest builds. See the docs for more info on gatsby-source-drupal Image CDN support:\n\nhttps://github.com/gatsbyjs/gatsby/tree/master/packages/gatsby-source-drupal#readme`
691
+
`[gatsby-source-drupal]\nNo Gatsby Image CDN placeholder style found. Please ensure that you have a placeholder style in your Drupal site for the fastest builds. See the docs for more info on gatsby-source-drupal Image CDN support:\n${imageCdnDocs}\n`
// polyfill so image CDN works on older versions of Gatsby
863
-
addRemoteFilePolyfillInterface(
864
-
// this type is merged in with the inferred file__file type, adding Image CDN support via the gatsbyImage GraphQL field. The `RemoteFile` interface as well as the polyfill above are what add the gatsbyImage field.
865
-
schema.buildObjectType({
866
-
name: `file__file`,
867
-
fields: {},
868
-
interfaces: [`Node`,`RemoteFile`],
869
-
}),
870
-
{
871
-
schema,
872
-
actions,
873
-
}
874
-
),
875
-
])
863
+
exports.createSchemaCustomization=(
864
+
{ actions, schema, reporter },
865
+
pluginOptions
866
+
)=>{
867
+
if(pluginOptions.skipFileDownloads){
868
+
actions.createTypes([
869
+
// polyfill so image CDN works on older versions of Gatsby
870
+
addRemoteFilePolyfillInterface(
871
+
// this type is merged in with the inferred file__file type, adding Image CDN support via the gatsbyImage GraphQL field. The `RemoteFile` interface as well as the polyfill above are what add the gatsbyImage field.
872
+
schema.buildObjectType({
873
+
name: `file__file`,
874
+
fields: {},
875
+
interfaces: [`Node`,`RemoteFile`],
876
+
}),
877
+
{
878
+
schema,
879
+
actions,
880
+
}
881
+
),
882
+
])
883
+
}else{
884
+
reporter.info(
885
+
`[gatsby-source-drupal] Enable the skipFileDownloads option to use Gatsby's Image CDN. See the docs for more info:\n${imageCdnDocs}\n`
0 commit comments