Open codypearce opened 4 years ago
Hi,
That's unfortunate, I'll have to check that.
Is material bread the repo you are trying to upgrade to v3.1? Do you have a PR / branch to check?
The config has changed a lot with v3 as we are using the expo webpack config, which does much more than previous version.
I did some debugging and found disabling gatsby-plugin-offline
allows it to work again. I tried to reproduce this behavior in an example repo but couldn't. Sorry, wish I could provide more info but the project is closed source at the moment.
I also found this issue: https://github.com/gatsbyjs/gatsby/issues/10050, which describes the same problem with babel-preset-expo
and babel-plugin-react-native-web
.
Thanks
Maybe it's related to service workers or something? Can you try with gatsby-plugin-offline but in a private browsing session?
Also, can you try to add this plugin first in the gatsby plugins list? (order may matter, but I don't think it's related here)
@slorber I was able to reproduce the problem in a stripped down example repo. https://github.com/codypearce/rnw-gatsbyjs-problem
You should be able to see the problem when building the static site and serving it:
npm i
npm run build
npm run serve
thanks, I'll take a look at it probably this weekend or next week
I installed the packages in the README and added
gatsby-plugin-react-native-web
togatsbyjs-config
. Everything works fine in development, but building the site and serving it in production causes the error below:If I remove the plugin from the config then the issue goes away. I've used
V2.0.0
on other Gatsbyjs sites, like https://material-bread.org, without running into this issue. Any ideas what might be wrong?