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

IE 11 with Babel #1099

Open
nemoeric opened this issue Jul 1, 2020 · 1 comment
Open

IE 11 with Babel #1099

nemoeric opened this issue Jul 1, 2020 · 1 comment

Comments

@nemoeric
Copy link

nemoeric commented Jul 1, 2020

This repo is no longer active. See README for details

Hey there,

I know slate is no longer under maintenance but maybe some of you will know how to configure Babel correctly.
It seems like my javascript is not compatible with IE 11, and for some of stores, their visitors are still coming from this this browser...

My javascript files seems to be compiled, but still Classes are not re interpreted by Babel into a readable js for IE.
I get this SCRIPT1002 : Syntax Error referencing at my JS code new class{constructor(e)...

Anyone know how to correctly configure Slate so that my JS works on IE 11 ?

Thanks a lot !

@curiouscrusher
Copy link

I've had reasonable success with IE 11 compatibility using the following in my .babelrc

  "presets": [
    "shopify/web",
    ["env", {
      "targets": {
        "browsers": ["last 3 major versions", "safari >= 7", "IE 11"]
      }
    }]
  ],
  "plugins": [
    ["transform-async-to-generator"],
    ["transform-es2015-spread"],
    ["transform-class-properties"],
  ]
}

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

2 participants