I recently created my first official plugin (yay!) and realized I had a URL reference in my plugin's JS file that might not work for certain sites:
wp_enqueue_script. I understand that the URL will work for most people, but if their WordPress installation isn't at the base of their domain, then it will be a broken link.
I know I could move the JS into one of my plugin's PHP files and then use
plugin_dir_url( __FILE__ ) or
Is there a way around this?