diff options
author | Henning Dieterichs <notify.henning.dieterichs@live.de> | 2022-07-22 15:07:44 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-07-22 15:07:44 +0300 |
commit | 5f21c372de5506c8916f3dd1ce9344bfcab85ef5 (patch) | |
tree | d1112ed918aa65905ff6ac39352d58de0d2ff221 /build | |
parent | 052f02175f4752c36024c18cfbca4e13403e10c3 (diff) |
Make treeshaking work on windows (#155952)
Diffstat (limited to 'build')
-rw-r--r-- | build/lib/treeshaking.js | 2 | ||||
-rw-r--r-- | build/lib/treeshaking.ts | 2 |
2 files changed, 4 insertions, 0 deletions
diff --git a/build/lib/treeshaking.js b/build/lib/treeshaking.js index 8fc5930c024..9a11c6fd9cc 100644 --- a/build/lib/treeshaking.js +++ b/build/lib/treeshaking.js @@ -89,6 +89,8 @@ function discoverAndReadFiles(ts, options) { const in_queue = Object.create(null); const queue = []; const enqueue = (moduleId) => { + // To make the treeshaker work on windows... + moduleId = moduleId.replace(/\\/g, '/'); if (in_queue[moduleId]) { return; } diff --git a/build/lib/treeshaking.ts b/build/lib/treeshaking.ts index 1d2e1bd4381..eb4f6f7767a 100644 --- a/build/lib/treeshaking.ts +++ b/build/lib/treeshaking.ts @@ -142,6 +142,8 @@ function discoverAndReadFiles(ts: typeof import('typescript'), options: ITreeSha const queue: string[] = []; const enqueue = (moduleId: string) => { + // To make the treeshaker work on windows... + moduleId = moduleId.replace(/\\/g, '/'); if (in_queue[moduleId]) { return; } |