GrappleGQL / gatsby-source-wagtail

Plugin for sourcing Gatsby data from Wagtail CMS
17 stars 12 forks source link

Change murmurhash import #14

Closed timmysmalls closed 4 years ago

timmysmalls commented 4 years ago

Resolves #13

This looks like a big deal, but I really only changed two lines:

const murmurhash = require(`babel-plugin-remove-graphql-queries/murmur`);

became:

const murmurModule = require(`babel-plugin-remove-graphql-queries/murmur`);
const murmurhash = typeof murmurModule === 'function' ? murmurModule : murmurModule.murmurhash;

It's the same fix that was applied here: https://github.com/birkir/gatsby-source-graphql-universal/pull/16 for another source plugin facing a similar issue.

tbrlpld commented 4 years ago

Looks like @NathHorrigan has applied that same change in https://github.com/NathHorrigan/gatsby-source-wagtail/commit/1e3635f38931df975afa0ce5345c7a790847037f

I just tried it out and it works fine. I am not running into the ''murrmurrhash" error.

Guess the PR could be closed

timmysmalls commented 4 years ago

Yep! Just came to the same conclusion!