Hi, looks like you're using original typed library which is written in ES
and it's not very well supported among the browsers. You should pick
transpiled version from lib-directory, that should work with all browsers
without problems.

On Fri, Mar 2, 2018 at 8:32 AM, lakeshow <sjung2...@gmail.com> wrote:

> I'm attempting to use the script of a third party JS library:
>
> {% block javascript %}
>     <script src="{% static 'js/typed/typed.js' %}"></script>
>     ...{% endblock javascript %}
>
> Doing so will return an error: `Uncaught SyntaxError: Enexpected token {`
> And this error refers to line 1 of 'typed.js', more specifically, this
> line of JS code:  `import { initializer } from './initializer.js';`
>
> What seems to be the problem? I have no trouble including the scripts of
> any other JS code. The only difference I see between this instance and my
> working JS files is that this library I'm attempting to use uses syntax
> particular to ES(?)
>
> Here is the specific library in question: https://github.com/mattboldt/
> typed.js/
>
> It's a relatively well known library so I don't think the code is a
> problem either.
>
>
>
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to django-users+unsubscr...@googlegroups.com.
> To post to this group, send email to django-users@googlegroups.com.
> Visit this group at https://groups.google.com/group/django-users.
> To view this discussion on the web visit https://groups.google.com/d/
> msgid/django-users/044cef5d-7a71-4d62-8ff2-d55f3e13143c%40googlegroups.com
> <https://groups.google.com/d/msgid/django-users/044cef5d-7a71-4d62-8ff2-d55f3e13143c%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>



-- 
Jani Tiainen

- Well planned is half done, and a half done has been sufficient before...

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAHn91oe86tdXywOwQ6S3ejT5aoW%2BssD0-JyFScinwirHqquaag%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to