dojo / webpack-contrib

Plugins and loaders for webpack used with Dojo
Other
4 stars 19 forks source link

Dojo BTR fails with non-protocol anchor tags #326

Closed odoe closed 3 years ago

odoe commented 3 years ago

Bug?

If you have an anchor tag without a protocol, Dojo BTR throws an unhandled Promise rejection error. I'm not sure if it's from jsdom or something in the BTR pipeline. This can cause random CI failures.

Package Version: 7.0.4

Code

<a href="twitter.com">twitter link</a>

Produces this error and node process can hang randomly.

Build Time Render Error (path: "twitter.com"): Failed to visit path

Sample project: https://github.com/odoe/dojo-btr-test

Expected behavior:

Technically, users should avoid non-protocol URLs, but if the error could be caught in BTR, it would be nice to provide a message of the issue. I found this after building a 230 page site that was exported to markdown from wordpress. If not, this could be something of note in BTR documentation in case other users come across it.

Actual behavior:

Build fails, and looks like with more than a few bad tags, node process can hang.