Not sure if i should post this because it seems to be a problem with the gatsby.com cloud plataform, not with GatsbyJS itself.
Deploying the app to gatsby.com cloud builds it in development mode, and the service worker does not register.
Building it in production locally works fine.
Deploying on Netlify works fine too.
Live Demo at gatsby.com (deploys as development environment for unknown reason)
Live Demo at Netlify (works fine)
Building locally: (this works fine too)
clone the repo and run:
npm install (or yarn install)
gatsby build
gatsby serve
It should deploy as Production env.
It deploys as Development environment, thus making the service worker not register.
System:
OS: Linux 5.3 Fedora 31 (Workstation Edition) 31 (Workstation Edition)
CPU: (4) x64 AMD A10-7700K Radeon R7, 10 Compute Cores 4C+6G
Shell: 5.0.7 - /bin/bash
Binaries:
Node: 12.13.0 - /usr/bin/node
Yarn: 1.19.1 - /usr/local/bin/yarn
npm: 6.13.1 - /usr/local/bin/npm
Languages:
Python: 3.7.5 - /usr/bin/python
Browsers:
Chrome: 78.0.3904.108
Firefox: 70.0.1
npmPackages:
gatsby: ^2.18.3 => 2.18.4
gatsby-plugin-manifest: ^2.2.30 => 2.2.30
gatsby-plugin-offline: ^3.0.24 => 3.0.24
gatsby-plugin-react-helmet: ^3.1.16 => 3.1.16
npmGlobalPackages:
gatsby-cli: 2.8.13
Hi @DouglasMV, actually this is the expected behavior. Gatsby Cloud provides real-time previews that means Gatsby Cloud is like a gatsby develop in the cloud. This is powerful because this way you can edit your code/content and see live previews.
more info: https://www.gatsbyjs.org/blog/2019-11-14-announcing-gatsby-cloud/#features
And Gatsby Cloud Builds are in private beta right now. It will actually deploy a production version of your site.
TL;DR
gatsby develop in the cloudHi!
If you have questions about Gatsby Cloud please reach out to [email protected]
Furthermore this is expected behavior, Gatsby Preview is not intended for hosting but our cloud builds are. You can find the links above.
Most helpful comment
Hi @DouglasMV, actually this is the expected behavior. Gatsby Cloud provides real-time previews that means Gatsby Cloud is like a
gatsby developin the cloud. This is powerful because this way you can edit your code/content and see live previews.more info: https://www.gatsbyjs.org/blog/2019-11-14-announcing-gatsby-cloud/#features
And Gatsby Cloud Builds are in private beta right now. It will actually deploy a production version of your site.
TL;DR
gatsby developin the cloud