I have almost the same Problem using Gatsby. Just to let you know so that you can check out my topic as well:
If you have any solution please let me know.
Regards Leon