Skip to content

Commit 5431b85

Browse files
authored
Merge pull request #192 from NativeScript/sis0k0/wp-source-maps
feat: add source map paths for debugging with webpack
2 parents 47f8218 + a3a0b25 commit 5431b85

File tree

1 file changed

+42
-8
lines changed

1 file changed

+42
-8
lines changed

package.json

Lines changed: 42 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,10 @@
139139
"platform": "ios",
140140
"appRoot": "${workspaceRoot}",
141141
"sourceMaps": true,
142-
"watch": true
142+
"watch": true,
143+
"sourceMapPathOverrides": {
144+
"webpack:///*": "${workspaceRoot}/app/*"
145+
}
143146
},
144147
{
145148
"name": "Attach on iOS",
@@ -148,7 +151,10 @@
148151
"platform": "ios",
149152
"appRoot": "${workspaceRoot}",
150153
"sourceMaps": true,
151-
"watch": false
154+
"watch": false,
155+
"sourceMapPathOverrides": {
156+
"webpack:///*": "${workspaceRoot}/app/*"
157+
}
152158
},
153159
{
154160
"name": "Launch on Android",
@@ -157,7 +163,10 @@
157163
"platform": "android",
158164
"appRoot": "${workspaceRoot}",
159165
"sourceMaps": true,
160-
"watch": true
166+
"watch": true,
167+
"sourceMapPathOverrides": {
168+
"webpack:///*": "${workspaceRoot}/app/*"
169+
}
161170
},
162171
{
163172
"name": "Attach on Android",
@@ -166,7 +175,10 @@
166175
"platform": "android",
167176
"appRoot": "${workspaceRoot}",
168177
"sourceMaps": true,
169-
"watch": false
178+
"watch": false,
179+
"sourceMapPathOverrides": {
180+
"webpack:///*": "${workspaceRoot}/app/*"
181+
}
170182
}
171183
],
172184
"configurationSnippets": [
@@ -180,7 +192,10 @@
180192
"platform": "ios",
181193
"appRoot": "^\"\\${workspaceRoot}\"",
182194
"sourceMaps": true,
183-
"watch": true
195+
"watch": true,
196+
"sourceMapPathOverrides": {
197+
"webpack:///*": "${workspaceRoot}/app/*"
198+
}
184199
}
185200
},
186201
{
@@ -193,7 +208,10 @@
193208
"platform": "android",
194209
"appRoot": "^\"\\${workspaceRoot}\"",
195210
"sourceMaps": true,
196-
"watch": true
211+
"watch": true,
212+
"sourceMapPathOverrides": {
213+
"webpack:///*": "${workspaceRoot}/app/*"
214+
}
197215
}
198216
},
199217
{
@@ -206,7 +224,10 @@
206224
"platform": "ios",
207225
"appRoot": "^\"\\${workspaceRoot}\"",
208226
"sourceMaps": true,
209-
"watch": false
227+
"watch": false,
228+
"sourceMapPathOverrides": {
229+
"webpack:///*": "${workspaceRoot}/app/*"
230+
}
210231
}
211232
},
212233
{
@@ -219,7 +240,10 @@
219240
"platform": "android",
220241
"appRoot": "^\"\\${workspaceRoot}\"",
221242
"sourceMaps": true,
222-
"watch": false
243+
"watch": false,
244+
"sourceMapPathOverrides": {
245+
"webpack:///*": "${workspaceRoot}/app/*"
246+
}
223247
}
224248
}
225249
],
@@ -274,6 +298,11 @@
274298
"type": "boolean",
275299
"description": "Whether the watch and reconnect on file change.",
276300
"default": true
301+
},
302+
"sourceMapPathOverrides": {
303+
"type": "object",
304+
"description": "A set of mappings for rewriting the locations of source files from what the sourcemap says, to their locations on the disk.",
305+
"default": null
277306
}
278307
}
279308
},
@@ -317,6 +346,11 @@
317346
"type": "boolean",
318347
"description": "Whether the watch and reconnect on file change.",
319348
"default": true
349+
},
350+
"sourceMapPathOverrides": {
351+
"type": "object",
352+
"description": "A set of mappings for rewriting the locations of source files from what the sourcemap says, to their locations on the disk.",
353+
"default": null
320354
}
321355
}
322356
}

0 commit comments

Comments
 (0)