Skip to content
This repository has been archived by the owner on Apr 16, 2021. It is now read-only.

Unable to make it work under IE11 #22

Open
super2ni opened this issue Feb 3, 2019 · 2 comments
Open

Unable to make it work under IE11 #22

super2ni opened this issue Feb 3, 2019 · 2 comments

Comments

@super2ni
Copy link

super2ni commented Feb 3, 2019

Hello there,

Thank you for the hard work on this project.

I am trying to build a website in this context:

  • Using Vue CLI 3.0.3
  • Use Office Fabric UI for the design
  • IE11 as one of the browsers

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
Copy link

a2life commented Apr 16, 2019

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
Copy link

jvaca92 commented Jul 18, 2019

Just quick advice in case if you use Typescript.

  • First download plyfill via
    npm install ts-polyfill

  • Then in tsconfig added in the libs section es2016.array.include

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

  • Finally in index.ts added

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

Hope this help someone

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants