What is the best way to include two variables for a single package that is required in JavaScript?
I have an example here:
$ = require('jquery');
At the moment I simply use $ however some of my project uses jQuery which I cannot change.
$, jQuery = require('jquery');
However this did not work which was expected to be honest.
This works however it isn't ideal as it will be requiring the package twice wont it?
$ = require('jquery');
jQuery = require('jquery');
Thanks
$ = require('jquery'); jQuery = $;jQueryis a global variable then why require it?(function ($) { /* jquery code here */ }(jQuery))