Open wzfjesun opened 5 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).
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.
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.
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.
I installed babel-polyfill ,but there is still the error.![image](https://user-images.githubusercontent.com/6768736/58084870-3d286080-7bee-11e9-9d70-4076d6833b6d.png)