epicmaxco / epic-spinners

Easy to use css spinners collection with Vue.js integration
https://epic-spinners.epicmax.co
MIT License
3.84k stars 355 forks source link

there is an error under ie11 #33

Open wzfjesun opened 5 years ago

wzfjesun commented 5 years ago

I installed babel-polyfill ,but there is still the error. image

image

scottasmith commented 4 years ago

The actual .js file includes back-ticks in latest version and IE 11 breaks. This would not be transpiled by babel because its a .js file hence copying the contents to the output as is (es6+ compliant).

ymmooot commented 4 years ago

Exported scripts as default are not transpiled with babel. You have to import from 'epic-spinners/dist/lib/epic-spinners.min.js'. It is transpiled and you can use it in old browsers.

devotoare commented 4 years ago

Exported scripts as default are not transpiled with babel. You have to import from 'epic-spinners/dist/lib/epic-spinners.min.js'. It is transpiled and you can use it in old browsers.

This does not exist when installing the package, and neither does build/build-lib.js so we cannot build the dist.

andrewguest commented 4 years ago

I just ran into this exact issue and I was about to completely remove epic-spinners, but @ymmooot's instructions worked!

I replaced my previous code:

<script>  
  import { CirclesToRhombusesSpinner } from 'epic-spinners'

  export default {
    components: {
      CirclesToRhombusesSpinner
    }
  }
</script>

With:

<script>
  import 'epic-spinners/dist/lib/epic-spinners.min.css'
  import { CirclesToRhombusesSpinner } from 'epic-spinners/dist/lib/epic-spinners.min.js'

  export default {
    components: {
      CirclesToRhombusesSpinner
    }
  }
</script>

Now all of my components are working as expected on IE11.