I have a module that calls require
on a Javascript library. I am trying to compress my .js files with Django-Pipeline but after collectstatic
the web-page gives the error:
UncaughtReferenceError: require is not Defined
Normal testing/deployment works fine with collect-static if I don't use Django-Pipeline to compress the files. What is the correct setup for minifying my .js files without breaking dependencies - the documentation is kind of sparse. Is django-pipeline the right choice?
Edit: I've tried to make sure the 'required' models are compressed first in pipeline, but I can't seem to compress the module that require
is called from at all without it returning an error.