I've only been doing this for a week but have hit a problem. I have a centralised server side module (sparkfuncs.js) that gets variables from a remote site. This all works fine and dandy. However, at the top of the file is a require statement (var spark = require ('spark.js')). You can probably guess the rest.
Uncaught ReferenceError: require is not defined
I've done plenty of reading and think I need requirejs.js to get around the problem. I've read the docs and examples about a million times and can't seem to understand it. I'm assuming it gets around this problem so I'm keen to get it fixed.
Has anyone else had the same problem and how did they fix it?
Thanks for reading.....