I'm facing a unique issue involving a self-invoked function that requires jquery.
The specific library I need to use is: jquery.selectareas.js
Here's the code snippet:
import * as jQuery from 'jquery';
import "query.selectareas.js"
Runtime Error: jQuery is not defined at this line
I've experimented with different ways to import JQ, but no luck so far.
//import * as $ from 'jquery';
//import * as jQuery from 'jquery';
//window['$'] = window['jQuery'] = $;
//import "jquery"
My understanding is that the imported jQuery should be accessible inside the scope of jquery.selectareas.js when importing it because they share the same scope.
Note: The jquery functionality works after all the import statements have been executed.