-
-
Notifications
You must be signed in to change notification settings - Fork 21
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add url
dependency for browser compatibility
#28
Conversation
@@ -1,7 +1,7 @@ | |||
{ | |||
"name": "parse-github-url", | |||
"name": "isomorphic-parse-github-url", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this part shouldn’t be in the PR.
@@ -33,6 +34,9 @@ | |||
"scripts": { | |||
"test": "mocha" | |||
}, | |||
"dependencies": { | |||
"url": "^0.11.4" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this alone doesn’t do anything - requiring “url” always gets the core module, no matter what’s installed.
Apologies; I didn't realize that this was still open as a PR. Closing. |
@rvanasa i do hope you realize tho that the PR was ineffective, which includes your other package that you published? |
Since bundlers often resolve packages differently from Node, the forked version of the library worked as intended. However, in recent versions of Vite, this workaround is no longer necessary. |
If a node module bundler does that, then it is broken, full stop. |
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 theurl
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.