I have legacy code and a module definition like this:
define(["a", "b", "c", "d"], function(a, b, c) {
...
});
You can see that there are more dependencies than actual params that we are using at module.
Does it make any sense? I think module "d" is redundant.
This only means that module "d" (or, to be more precise, the result of calling "d"'s factory function) won't be passed as a parameter (e.g.
d) to the function, so it won't be available inside it.It's possible that module "d" executes some code with side-effects so removing it could potentially change how you application behaves (i.e. break something).