Skip to content

Commit a7956c1

Browse files
authored
fix: #167 support window path with \\ (#168)
* fix: #167 support window path with \\ * docs(changeset): support window path with \\ --------- Co-authored-by: liuyi <[email protected]>
1 parent df0754e commit a7956c1

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

.changeset/purple-rings-attend.md

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'ko': patch
3+
---
4+
5+
support window path with \\

packages/ko/src/webpack/loaders/script.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ class Script {
1717
test: /\.worker.[jt]s$/,
1818
loader: this.WORKER_LOADER,
1919
include: (input: string) =>
20-
input.includes('dt-react-monaco-editor/lib/languages'),
20+
/dt-react-monaco-editor[\\/]lib[\\/]languages/.test(input),
2121
options: {
2222
inline: 'fallback',
2323
},
@@ -26,7 +26,7 @@ class Script {
2626
test: /\.m?(t|j)sx?$/,
2727
include: (input: string) => {
2828
// internal modules dt-common compatible
29-
if (input.includes('node_modules/dt-common/src/')) {
29+
if (/node_modules[\\/]dt-common[\\/]src[\\/]/.test(input)) {
3030
return true;
3131
} else if (input.includes('antlr4-c3')) {
3232
return true;

0 commit comments

Comments
 (0)