gatsby new tutorial-part-one https://github.com/gatsbyjs/gatsby-starter-hello-world
cd tutorial-part-one && gatsby develop
index.js
in src/pages/
and save the file. Modifiez index.js
dans src/pages/
et enregistrez le fichier.Gatsby's development server should hot reload in the browser and reflect changes made in src/pages/index.js
. Le serveur de développement de Gatsby devrait se recharger à chaud dans le navigateur et refléter les modifications apportées dans src/pages/index.js
. The view must be as below: La vue doit être comme ci-dessous :
No hot reloading in the browser. Pas de rechargement à chaud dans le navigateur.
It works for me when I start the server with gatsby develop --host localhost
. Cela fonctionne pour moi lorsque je démarre le serveur avec gatsby develop --host localhost
. This is either unexpected behavior or should be added to all tutorials that mention hot reloading with gatsby develop
. Il s'agit soit d'un comportement inattendu, soit d'un comportement à ajouter à tous les didacticiels mentionnant le rechargement à chaud avec gatsby develop
.
@andreasgruenh L'ajout gatsby develop --host localhost
n'exposera pas le serveur de développement au réseau.
Hi @andreasgruenh @gagan0723 please see https://github.com/gatsbyjs/gatsby/pull/2983#issuecomment -346126702 and https://github.com/gatsbyjs/gatsby/issues/2960#issuecomment -346130796 and more recent comments. Salut @andreasgruenh @gagan0723 s'il vous plaît voir https://github.com/gatsbyjs/gatsby/pull/2983#issuecomment -346126702 et https://github.com/gatsbyjs/gatsby/issues/2960#issuecomment -346130796 et des commentaires plus récents . Looks like we should default to localhost
on Mac as well to avoid these. Il semble que nous devrions également utiliser par défaut localhost
sur Mac pour les éviter. For local network testing on Mac can do -H [machine_name].local
, any of that help? Pour les tests de réseau local sur Mac, vous pouvez faire -H [machine_name].local
, cela vous aide-t-il ?
Commentaire le plus utile
It works for me when I start the server with
engatsby develop --host localhost
. Cela fonctionne pour moi lorsque je démarre le serveur avecgatsby develop --host localhost
. This is either unexpected behavior or should be added to all tutorials that mention hot reloading withgatsby develop
. Il s'agit soit d'un comportement inattendu, soit d'un comportement à ajouter à tous les didacticiels mentionnant le rechargement à chaud avecgatsby develop
.