Skip to content

Commit 5ad2852

Browse files
committed
Try to please webpack
1 parent 192c67d commit 5ad2852

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/vs/base/common/network.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -199,7 +199,7 @@ class FileAccessImpl {
199199
asBrowserUri(uri: URI): URI;
200200
asBrowserUri(moduleId: AppResourcePath | ''): URI;
201201
asBrowserUri(uriOrModule: URI | AppResourcePath | ''): URI {
202-
const uri = this.toUri(uriOrModule);
202+
const uri = this.toUri(uriOrModule, require);
203203

204204
// Handle remote URIs via `RemoteAuthorities`
205205
if (uri.scheme === Schemas.vscodeRemote) {
@@ -239,7 +239,7 @@ class FileAccessImpl {
239239
asFileUri(uri: URI): URI;
240240
asFileUri(moduleId: AppResourcePath | ''): URI;
241241
asFileUri(uriOrModule: URI | AppResourcePath | ''): URI {
242-
const uri = this.toUri(uriOrModule);
242+
const uri = this.toUri(uriOrModule, require);
243243

244244
// Only convert the URI if it is `vscode-file:` scheme
245245
if (uri.scheme === Schemas.vscodeFileResource) {
@@ -257,12 +257,12 @@ class FileAccessImpl {
257257
return uri;
258258
}
259259

260-
private toUri(uriOrModule: URI | string): URI {
260+
private toUri(uriOrModule: URI | string, moduleIdToUrl: { toUrl(moduleId: string): string }): URI {
261261
if (URI.isUri(uriOrModule)) {
262262
return uriOrModule;
263263
}
264264

265-
return URI.parse(require.toUrl(uriOrModule));
265+
return URI.parse(moduleIdToUrl.toUrl(uriOrModule));
266266
}
267267
}
268268

0 commit comments

Comments
 (0)