V
V
Vladimir Kuts2019-07-23 09:43:20
Django
Vladimir Kuts, 2019-07-23 09:43:20

How vue.js compatible with IE11?

I am developing some application on django + vue.
I included the vue.js library in the header.
I am making a simple application. Something like:

<style type="text/css">
  [v-cloak] > * { display:none }
  [v-cloak]::before { content: "загрузка…" }
</style>
<div id="app" v-cloak>
   ...
</div>
<script type="module">

  new Vue({
      el: '#app',
      delimiters: [''],  // Так как шаблонизатор Django - для вывода переменных использую скобки 
      data: {
          items: [
            { title: 'Приложение 1', icon: 'account_box', url: "{% url 'app1' %}" }, // вместо {% url 'url' %} тут подставится актуальный url
            { title: 'Приложение 2', icon: 'date_range', url: "{% url 'app2' %}" },
          ]
      },
      methods: {
      	select: function(instance) {
        window.location.href = instance.url;
      }
      }
  });
</script>

In chrome, firefox everything works as intended.
In IE11 the code is not executed. And no errors are displayed in the console either.
As I understand it, I need to include polyfills. But I can’t figure out which ones and how to connect them in a particular case, so that IE11 support will work.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
#
#FFFFFF, 2019-07-23
@victory_vas

I import (pre-installed by npm) and everything works fine. import '@babel/polyfill';

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question