Open webpack-bot opened 7 years ago
It seems an eco-system winner is the url-parse package.
any update?
Having this issue on a production app. A fix would be nice to see. Mentioning @defunctzombie because they're the only clear maintainer.
I don't maintain this module anymore.
@defunctzombie i'd be happy to take it over, if only to clear up issues like this.
I've added @ljharb you as a collaborator.
@defunctzombie thanks! if you want to npm owner add ljharb
, that'd be great. Also, if you wanted to transfer this into the browserify org, that would ensure there's not a single point of failure anywhere :-)
@ljharb I've added you as the owner on npm.
I'll address this as part of the "node catchup" described in #53.
It seems like the solution to this is literally to change the last line of url.js from
exports.Url = Url;
to
exports.URL = Url;
. For now I'm just going to make the change locally I guess.
I should note that this is specifically for parity with the native Node module. The class is called URL in that, not Url (at least at the time of writing this.)
@Lazauya i don't think that's quite the same thing; i'm pretty confident the Url
class is not a WHATWG-compliant URL replacement.
You are correct, now that I look more closely at it. It's strange that Parcel relies on it as such, I think I'll file a bug report over there.
I browserify url to my package url-myh by adding this: https://github.com/MrMYHuang/node-url/blob/66254d75eb169565d1290aae43337b0973a5fa87/url.js#L774
It works well with a combination of webpack 5 + node-polyfill-webpack-plugin-myh (using url-myh) + node-downloader-helper + memfs-myh. This is an example: https://github.com/MrMYHuang/taa
Do you want to request a feature or report a bug?
Bug with WHATWG URL API provided by native
url
module.What is the current behavior?
If the current behavior is a bug, please provide the steps to reproduce. I provided code above, is it a normal behavior and we should use Web API URL or WHATWG URL API should be provided through
url
module?What is the expected behavior?
Please mention your webpack and Operating System version.
node 8.2.1 webpack 3.3.0 macOS Sierra 10.12.6
This issue was moved from webpack/webpack#5372 by @sokra. Orginal issue was by @zalishchuk.
node-url exports it as
exports.Url
instead ofexports.URL