bud.provide
bud.provide makes a variable or module available throughout the entire application.
Usage
To specify that $
is the default jquery
export:
bud.provide({
jquery: '$',
})
Now, in any module in our application, the jquery
module can be referenced using $
. There is no need to import it.
$(`#modal`) // it just works
If you have have more than one token referring to the same module, use an array:
bud.provide({
jquery: ['$', 'jQuery'],
})