Hi, I’m trying to wrap my head around the aurelia cli bundler. More specifically the when/why/how of dependencies, especially with 3rd party modules. We used jspm in the past and I’d like to move away from that and use aurelia cli bundler with system.js (I think)
A lot of our components make use of jquery plugins…like bootstrap-multiselect
I figured out (through trial and error) that to get bootstrap-multiselect to load I had to add it into the dependencies section of the vendor-bundle like so:
“dependencies”: [
“jquery”,
{
“name”: “datatables.net”,
“path”: “…/node_modules/datatables.net”,
“main”: “js/jquery.dataTables”,
“deps”: [“jquery”],
“exports”: “"
},
{
"name": "bootstrap",
"path": "../node_modules/bootstrap/dist",
"main": "js/bootstrap.min",
"deps": ["jquery"],
"exports": "”,
“resources”: [
“css/bootstrap.css”
]
},
{
“name”: “bootstrap-multiselect”,
“path”: “…/node_modules/bootstrap-multiselect/dist”,
“main”: “js/bootstrap-multiselect”,
“deps”: [“jquery”],
“exports”: “$”,
“resources”: [
“css/bootstrap-multiselect.css”
]
}
As you can see, I also added in datatables.net, which also uses jquery. But it doesn’t seem very consistent in terms of loading w/out jquery reference issues and I don’t understand all the properties and use-cases very well (deps, exports,etc.). And I can’t seem to find an in-depth discussion about dependencies. Are these node.js topics I should be researching? The Aurelia site covers basic usage and that seems to be about it. Is there any more in-depth material or explanation about dependencies and/or using jquery plugins and how to best load them into the bundle?