I'm just getting started with Component package manager. I understand that I can require
in other local modules by adding the module to the local
key in the component.json
file, but what if I don't want to treat every file as a module?
In the (very minimal) documentation for Component, it's developer TJ says that I can add any other relevant scripts (that live in the same directory) to the scripts
array. And yet, on doing so, I'm unable to require
or reference any of the peripheral scripts' methods from my main
file.
The require
method fails on trying to load in the script, and any attempt to reference the methods or variables from that script from the 'bootstrap' file are futile. My build.js
shows that the script has been compiled in, but I just can't seem to figure out the correct way to reference it from other scripts...
Help?