Skip to content

Commit 0e3e172

Browse files
committed
fix: drop url dependency for smaller build
1 parent 5abd744 commit 0e3e172

File tree

3 files changed

+4
-3
lines changed

3 files changed

+4
-3
lines changed

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@
5656
"lerna": "^4.0.0",
5757
"nativescript-vue": "^2.9.0",
5858
"ng-packagr": "~12.0.2",
59+
"normalize-url": "^7.0.0",
5960
"prettier": "^2.3.0",
6061
"promise-polyfill": "^8.2.0",
6162
"prompt": "^1.1.0",

plugin/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
"url": "https://github.com/nativescript-community/ui-webview/issues"
3131
},
3232
"dependencies": {
33-
"url": "^0.11.0"
33+
"normalize-url": "^7.0.0"
3434
},
3535
"gitHead": "afa99a5f27006ed7545af88d2f8544fc1721e41c"
3636
}

src/webview-ext-common.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@ import {
1111
path,
1212
} from '@nativescript/core';
1313
import { isEnabledProperty } from '@nativescript/core/ui/core/view';
14-
import * as URL from 'url';
1514
import { metadataViewPort, webViewBridge, promisePolyfill } from './nativescript-webview-bridge-loader';
15+
import normalizeUrl from 'normalize-url';
1616

1717
export interface ViewPortProperties {
1818
width?: number | 'device-width';
@@ -1170,7 +1170,7 @@ export class WebViewExtBase extends ContainerView {
11701170
return url;
11711171
}
11721172

1173-
return URL.parse(url).format();
1173+
return normalizeUrl(url);
11741174
}
11751175

11761176
/**

0 commit comments

Comments
 (0)