@@ -25,7 +25,7 @@ const sourceMappingURLRegex = RegExp(
25
25
innerRegex . source +
26
26
")" +
27
27
")" +
28
- "\\s*"
28
+ "\\s*" ,
29
29
) ;
30
30
/* eslint-enable prefer-template */
31
31
@@ -145,7 +145,7 @@ async function fetchFromFilesystem(loaderContext, sourceURL) {
145
145
} ) ;
146
146
} catch ( error ) {
147
147
throw new Error (
148
- `Failed to parse source map from '${ sourceURL } ' file: ${ error } `
148
+ `Failed to parse source map from '${ sourceURL } ' file: ${ error } ` ,
149
149
) ;
150
150
}
151
151
@@ -155,15 +155,15 @@ async function fetchFromFilesystem(loaderContext, sourceURL) {
155
155
async function fetchPathsFromFilesystem (
156
156
loaderContext ,
157
157
possibleRequests ,
158
- errorsAccumulator = ""
158
+ errorsAccumulator = "" ,
159
159
) {
160
160
let result ;
161
161
162
162
try {
163
163
result = await fetchFromFilesystem (
164
164
loaderContext ,
165
165
possibleRequests [ 0 ] ,
166
- errorsAccumulator
166
+ errorsAccumulator ,
167
167
) ;
168
168
} catch ( error ) {
169
169
// eslint-disable-next-line no-param-reassign
@@ -180,7 +180,7 @@ async function fetchPathsFromFilesystem(
180
180
return fetchPathsFromFilesystem (
181
181
loaderContext ,
182
182
tailPossibleRequests ,
183
- errorsAccumulator
183
+ errorsAccumulator ,
184
184
) ;
185
185
}
186
186
@@ -196,7 +196,7 @@ async function fetchFromURL(
196
196
context ,
197
197
url ,
198
198
sourceRoot ,
199
- skipReading = false
199
+ skipReading = false ,
200
200
) {
201
201
// 1. It's an absolute url and it is not `windows` path like `C:\dir\file`
202
202
if ( isURL ( url ) ) {
@@ -221,21 +221,21 @@ async function fetchFromURL(
221
221
const sourceURL = path . normalize ( pathFromURL ) ;
222
222
const { data : sourceContent } = await fetchFromFilesystem (
223
223
loaderContext ,
224
- sourceURL
224
+ sourceURL ,
225
225
) ;
226
226
227
227
return { sourceURL, sourceContent } ;
228
228
}
229
229
230
230
throw new Error (
231
- `Failed to parse source map: '${ url } ' URL is not supported`
231
+ `Failed to parse source map: '${ url } ' URL is not supported` ,
232
232
) ;
233
233
}
234
234
235
235
// 2. It's a scheme-relative
236
236
if ( / ^ \/ \/ / . test ( url ) ) {
237
237
throw new Error (
238
- `Failed to parse source map: '${ url } ' URL is not supported`
238
+ `Failed to parse source map: '${ url } ' URL is not supported` ,
239
239
) ;
240
240
}
241
241
@@ -250,13 +250,13 @@ async function fetchFromURL(
250
250
251
251
if ( url . startsWith ( "/" ) ) {
252
252
possibleRequests . push (
253
- getAbsolutePath ( context , sourceURL . slice ( 1 ) , sourceRoot )
253
+ getAbsolutePath ( context , sourceURL . slice ( 1 ) , sourceRoot ) ,
254
254
) ;
255
255
}
256
256
257
257
const result = await fetchPathsFromFilesystem (
258
258
loaderContext ,
259
- possibleRequests
259
+ possibleRequests ,
260
260
) ;
261
261
262
262
sourceURL = result . path ;
0 commit comments