From 070fe40e81e7598bfb1c4eb835302d043b77c3fc Mon Sep 17 00:00:00 2001 From: liuyi Date: Wed, 17 Apr 2024 19:26:55 +0800 Subject: [PATCH] fix: #163 scriptLoader with antlr4ng --- packages/ko/src/webpack/loaders/script.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/packages/ko/src/webpack/loaders/script.ts b/packages/ko/src/webpack/loaders/script.ts index 5385c6f5..5c7af3e6 100644 --- a/packages/ko/src/webpack/loaders/script.ts +++ b/packages/ko/src/webpack/loaders/script.ts @@ -23,13 +23,15 @@ class Script { }, }, { - test: /\.(t|j)sx?$/, + test: /\.m?(t|j)sx?$/, include: (input: string) => { // internal modules dt-common compatible if (input.includes('node_modules/dt-common/src/')) { return true; } else if (input.includes('antlr4-c3')) { return true; + } else if (input.includes('antlr4ng')) { + return true; } else if (input.includes('node_modules')) { return false; } else {