The following code works:
define(["./my/dependency"], function (myDep) {
return awesomeness
// Everything is fine :)
}
It would be very nice, due to restrictions in the environment I'm working in, to define dependencies earlier in an array but this doesn't work:
deps = ["./my/dependency"]
define(deps, function (myDep) {
return abandonAllHope
// Everything is terrible :(
})
I'm new to Javascript/requireJS/nodeJS and working to alter an existing nodeJS project. The website fails to load major elements when I try the second option. I'm not sure how to bugfix this issue and can't understand why only the second option fails.