aidewoode / office-ui-fabric-vue

Office UI Fabric implementation for Vue.js
https://aidewoode.github.io/office-ui-fabric-vue/
Other
273 stars 30 forks source link

Unable to make it work under IE11 #22

Open super2ni opened 5 years ago

super2ni commented 5 years ago

Hello there,

Thank you for the hard work on this project.

I am trying to build a website in this context:

I created a very simple Vue SPA using Vue CLI and then added your project using npm. As soon as I added the following code to the App.vue component, my application was not working on IE11: <ou-button>Create Account</ou-button>

Error in dev console was (sorry for the French language):

SCRIPT438: L’objet ne gère pas la propriété ou la méthode « includes » vue.runtime.esm.js (3273,7)

But as soon as I have added the polyfill for Array.prototype.includes in index.html, the problem went off: <script src="https://polyfill.io/v2/polyfill.js?features=Array.prototype.includes"></script>

I do not like to add external JS reference, do you mind telling what have I done wrong?

Thank you, Denis

a2life commented 5 years ago

I can confirm this issue with my use case. IE11 does not support the "array.prototype.includes" and it appears this implementation requires the use of this function, so you need the polyfill. Alternately, you may want to look at @johannes-z/office-ui-fabric-vue which does not require the polyfill but labeled as 'unstable' at this time.

Masaki

jvaca92 commented 5 years ago

Just quick advice in case if you use Typescript.

"lib": [ "dom", "dom.iterable", "es2015", "es2016.array.include", "es2017.object", "es2017.string", "es2018.asynciterable", "es2018.promise", "es2019.array", "es2019.string", "es2020.string" ]

import 'ts-polyfill/lib/es2019-array';

Hope this help someone