diff options
author | Ryan Dahl <ry@tinyclouds.org> | 2020-05-04 12:22:42 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-05-04 12:22:42 -0400 |
commit | 38ecabf205336c2cf51f2a18919da3dcb1a7db97 (patch) | |
tree | c31de02a8d01b26fbfab7ed14f25ea896340d635 /cli/js/compiler/bundler.ts | |
parent | 92c0591fcbf74ee34e7bc0518376d8fdb38feb30 (diff) |
Simplify ts-compiler's normalizeString (#5072)
Diffstat (limited to 'cli/js/compiler/bundler.ts')
-rw-r--r-- | cli/js/compiler/bundler.ts | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/cli/js/compiler/bundler.ts b/cli/js/compiler/bundler.ts index c9578fe20..3f05a3be3 100644 --- a/cli/js/compiler/bundler.ts +++ b/cli/js/compiler/bundler.ts @@ -1,7 +1,7 @@ // Copyright 2018-2020 the Deno authors. All rights reserved. MIT license. import { SYSTEM_LOADER } from "./bootstrap.ts"; -import { commonPath, normalizeString, CHAR_FORWARD_SLASH } from "./util.ts"; +import { commonPath, normalizeString } from "./util.ts"; import { assert } from "../util.ts"; let rootExports: string[] | undefined; @@ -10,12 +10,7 @@ function normalizeUrl(rootName: string): string { const match = /^(\S+:\/{2,3})(.+)$/.exec(rootName); if (match) { const [, protocol, path] = match; - return `${protocol}${normalizeString( - path, - false, - "/", - (code) => code === CHAR_FORWARD_SLASH - )}`; + return `${protocol}${normalizeString(path)}`; } else { return rootName; } |