HomePhabricator
Diffusion Comm 504fbdba25bd

[lib] Remove url-parse-lax from Webpack bundles

Description

[lib] Remove url-parse-lax from Webpack bundles

Summary:
By including this in lib/utils/url-utils.js, we end up including it in the Webpack bundles for web and landing. This bloats bundle size, and is also a problem because url-parse-lax only works in the Node.js environment and Webpack 5 prints a warning about that.

Our only usage of the normalizeURL function is from Markdown linking code in native, so this diff moves that usage to native so we don't include normalizeURL or url-parse-lax in our Webpack bundles.

Depends on D6697

Test Plan: Confirm native app still runs, bundle still generates, and Markdown links still navigate to the linked URL

Reviewers: atul, rohan

Reviewed By: atul

Subscribers: tomek

Differential Revision: https://phab.comm.dev/D6698

Details

Provenance
ashoatAuthored on Feb 12 2023, 8:00 AM
Reviewer
atul
Differential Revision
D6698: [lib] Remove url-parse-lax from Webpack bundles
Parents
rCOMMc2af4d6d0486: Reimplement generateRandomString using browser crypto module
Branches
Unknown
Tags
Unknown