From 7136d2dea3c64b7c862bcb4b63accff371e86d16 Mon Sep 17 00:00:00 2001 From: pathmapper Date: Fri, 15 Feb 2019 19:25:14 +0100 Subject: [PATCH] How to start externally accessible dev server --- README.md | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index eb042ec..1400bcc 100644 --- a/README.md +++ b/README.md @@ -51,10 +51,16 @@ npm install npm start ``` -The build process will watch for changes to the filesystem, rebuild and autoreload the editor. However note this from the webpack-dev-server docs +If you want Maputnik to be accessible externally use the [`--host` option](https://webpack.js.org/configuration/dev-server/#devserverhost): -> webpack uses the file system to get notified of file changes. In some cases this does not work. For example, when using Network File System (NFS). Vagrant also has a lot of problems with this. -Snippet from +```bash +# start externally accessible dev server +npm start -- --host 0.0.0.0 +``` + +The build process will watch for changes to the filesystem, rebuild and autoreload the editor. However note this from the [webpack-dev-server docs](https://webpack.js.org/configuration/dev-server/): + +> webpack uses the file system to get notified of file changes. In some cases this does not work. For example, when using Network File System (NFS). Vagrant also has a lot of problems with this. ([snippet source](https://webpack.js.org/configuration/dev-server/#devserverwatchoptions-)) To enable polling add `export WEBPACK_DEV_SERVER_POLLING=1` to your environment.