JSFiddle - React, Tailwind, and code Playground
HTML
<div>test</div>
JavaScript
jQuery.debug = true;
$ = function (selector, context) {
if (jQuery.debug && typeof selector === "string" && !jQuery(selector,context?context:undefined).length) throw new Error("No element found!");
return jQuery.apply(this, arguments);
};
console.log($('div'));
console.log($('span'));