diff --git a/.eslintignore b/.eslintignore index 941eaa3fb..322608d70 100644 --- a/.eslintignore +++ b/.eslintignore @@ -5,3 +5,4 @@ intl/* locales/* **/*.min.js **/node_modules/* +scratch-gui/* diff --git a/dev-server/index.js b/dev-server/index.js index 61874bd15..5ab70abbd 100644 --- a/dev-server/index.js +++ b/dev-server/index.js @@ -21,7 +21,18 @@ routes.forEach(route => { app.get(route.pattern, handler(route)); }); -app.use(webpackDevMiddleware(compiler)); +var middlewareOptions = {}; +if (process.env.USE_DOCKER_WATCHOPTIONS) { + middlewareOptions = { + watchOptions: { + aggregateTimeout: 500, + poll: 2500, + ignored: ['node_modules', 'build'] + } + }; +} + +app.use(webpackDevMiddleware(compiler, middlewareOptions)); var proxyHost = process.env.FALLBACK || ''; if (proxyHost !== '') { diff --git a/docker-compose.yml b/docker-compose.yml index 8915d2b21..99af28a33 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -15,6 +15,7 @@ services: environment: - API_HOST=http://localhost:8491 - FALLBACK=http://localhost:8080 + - USE_DOCKER_WATCHOPTIONS=true build: context: ./ dockerfile: Dockerfile