epic-spinners icon indicating copy to clipboard operation
epic-spinners copied to clipboard

there is an error under ie11

Open wzfjesun opened this issue 5 years ago • 4 comments

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

image

wzfjesun avatar May 21 '19 09:05 wzfjesun

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).

scottasmith avatar Sep 19 '19 11:09 scottasmith

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.

ymmooot avatar Dec 14 '19 21:12 ymmooot

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.

devotoare avatar Feb 19 '20 18:02 devotoare

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.

andrewguest avatar Mar 05 '20 03:03 andrewguest