From a3c6e044a9b44bfbe6a799e2e2377a15280b1569 Mon Sep 17 00:00:00 2001 From: Andy Eskridge Date: Tue, 29 Jun 2021 20:59:23 -0500 Subject: [PATCH] Convert the RegExp to a string --- src/index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/index.ts b/src/index.ts index ced06ad..dd04eb5 100644 --- a/src/index.ts +++ b/src/index.ts @@ -22,7 +22,7 @@ const withPrismaPlugin = (nextConfig = {}) => ( const ignore = ['.prisma/client', '@prisma/client'] // const includes = ignore.map(module => (new RegExp(`${module}(?!.*node_modules)`))); - const excludes = [new RegExp(`node_modules(?!/(${ignore.join('|')})(?!.*node_modules))`)] + const excludes = [new RegExp(`node_modules(?!/(${ignore.join('|')})(?!.*node_modules))`).toString()] const ignored = config.watchOptions.ignored .filter((ignored: string) => ignored !== '**/node_modules/**') .concat(excludes)