From 9a7d9dce10a61c380d7d4d876e8f20953068a1a7 Mon Sep 17 00:00:00 2001 From: Georgi Angelov Date: Tue, 17 Sep 2024 12:19:47 +0300 Subject: [PATCH] chore: do not process more modules than necessary --- src/index.cjs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/index.cjs b/src/index.cjs index 0c71235..49ae1c3 100644 --- a/src/index.cjs +++ b/src/index.cjs @@ -115,7 +115,11 @@ class ScratchWebpackConfigBuilder { exclude: [ { and: [/node_modules/], - not: [/node_modules[\\/].*scratch/] + + // Scratch-paint points to its source (instead of a pre-built version) + // for its browser target. So we need to process it (at the minimum to resolve + // the JSX syntax). + not: [/node_modules[\\/]scratch-paint\//] } ], options: {