django-compressor-parceljs
django-compressor-parceljs copied to clipboard
Getting Error When Using with Typescript
I believe I have everything installed and configured correctly.
STATICFILES_FINDERS = [ "django.contrib.staticfiles.finders.FileSystemFinder", "django.contrib.staticfiles.finders.AppDirectoriesFinder", "compressor.finders.CompressorFinder", ]
COMPRESS_ENABLED = True
COMPRESS_REBUILD_TIMEOUT = 2592000 # (30 days in seconds)
COMPRESS_OFFLINE = False
COMPRESS_OFFLINE_TIMEOUT = 31536000 # (1 year in seconds)
COMPRESS_OUTPUT_DIR = 'dev'
And in my template:
{% block extra_js %}
<script type="text/javascript" src="{% static 'bundle.js' %}"></script>
{% compress parcel file myts %}
<script src="{% static 'test.ts' %}"></script>
{% endcompress %}
{% endblock %}
However, when I hit the page I get the following error:
TypeError at /todo/
Signal.__init__() got an unexpected keyword argument 'providing_args'
Any idea what could be wrong?
I got around this error by editing signals.py to this:
import django.dispatch
post_compress = django.dispatch.Signal()
It now works for regular JS but for TS, modules don't seem to load.
@rjbullock Thanks for updating this. And I am very sorry for not replying when needed.