jonschlinkert / parse-github-url

Parse a Github URL into an object. Supports a wide variety of GitHub URL formats.
MIT License
121 stars 21 forks source link

Add `url` dependency for browser compatibility #28

Open rvanasa opened 2 years ago

rvanasa commented 2 years ago

This package causes a variety of issues with recent versions of create-react-app and Vite projects due to the need for a polyfill of Node's url module. This PR adds the url npm package as a dependency to make this package work out-of-the-box in the latest version of Webpack and other front-end bundlers.

In the meantime, the npm package isomorphic-parse-github-url is available as a short-term solution.

This change passes all tests and works as expected in a production web application.