Shopify/slate

IE 11 with Babel

nemoeric opened this issue · 1 comments

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 !

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"],
  ]
}