Commit 4a5ff11
authored
fix: prevent double dist substitution in worker path resolution (#508)
When workerPool.ts runs from dist/, the existing logic would
incorrectly try to replace 'src' with 'dist' again, leading to
malformed paths like dist/utils/main/dist/utils/main/worker.js.
Now checks if 'dist' already exists in the path before performing
the src->dist replacement, ensuring correct worker resolution in
both development (src/) and production (dist/) contexts.1 parent 4e04915 commit 4a5ff11
1 file changed
+3
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
33 | 33 | | |
34 | 34 | | |
35 | 35 | | |
| 36 | + | |
36 | 37 | | |
37 | 38 | | |
38 | 39 | | |
39 | | - | |
40 | | - | |
| 40 | + | |
| 41 | + | |
41 | 42 | | |
42 | 43 | | |
43 | 44 | | |
| |||
0 commit comments