Commit 34700c2
committed
fix: debugging apps with library set should work on all platforms
Currently when you set library in your webpack.config.js, you are able to debug your app on windows, but not on macOS and Linux. The problem is in the way `path.join` works for UNIX style paths. The current code appends `./` in the beginning of the path, which is normally a full path:
```
path.join(`.//Users/vladimirov/Work/nativescript-cli-2/scratch/app1`, "test1.js")
'Users/vladimirov/Work/nativescript-cli-2/scratch/app1/test1.js'
```
As you can see, this removes the starting `/` from the full path, so the VSCode extension is unabel to get correct path to the searched file (webpack.config.js in our case).
On windows the result is:
```
> path.join("./D:\\Work\\nativescript-cli\\scratch\\app1", "test1.js")
'D:\\Work\\nativescript-cli\\scratch\\app1\\test1.js'
```
Fix this by removing the `./` from the beginning - it was added there by mistake.1 parent b4b8f0a commit 34700c2
1 file changed
+1
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
186 | 186 | | |
187 | 187 | | |
188 | 188 | | |
189 | | - | |
| 189 | + | |
190 | 190 | | |
191 | 191 | | |
192 | 192 | | |
| |||
0 commit comments