From 2c343baeba79d9f1f9ef73e27715a60e9bb842ea Mon Sep 17 00:00:00 2001 From: Max Fierro Date: Sun, 28 Oct 2018 19:01:45 -0300 Subject: [PATCH] Fix issue with HMR not working (#5544) Change the ignore patterns to ignore `.git/` folder. Add Windows pattern matching for `.next/` and `.git/` folders. Fixes #5429 --- packages/next/server/hot-reloader.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/next/server/hot-reloader.js b/packages/next/server/hot-reloader.js index 5a2e64f2..1689187e 100644 --- a/packages/next/server/hot-reloader.js +++ b/packages/next/server/hot-reloader.js @@ -309,11 +309,11 @@ export default class HotReloader { this.prevChunkHashes = chunkHashes }) - // We don’t watch .git .next/ and node_modules for changes + // We don’t watch .git/ .next/ and node_modules for changes const ignored = [ - /\.git/, - /\.next\//, - /node_modules/ + /[\\/]\.git[\\/]/, + /[\\/]\.next[\\/]/, + /[\\/]node_modules[\\/]/ ] let webpackDevMiddlewareConfig = {