Parcel: Parcel does not support IE

Created on 12 Dec 2017  路  12Comments  路  Source: parcel-bundler/parcel

2345 20171212153104
2345 20171212153002

According to the example of the official website, the parcel was reported to be wrong in IE

All 12 comments

According to the screenshot the problem seems to be the arrow function in line 89.

@jxDeveloper What version of Parcel are you using? This should be fixed in the latest version v1.2.0, as the offending code no longer uses a non-es3 compatible arrow function.

Although that arrow function is gone in v1.2.0, @tonkotsuboy's fix removing the template literal has not made it out yet so Parcel is still Internet Explorer-incompatible.

(but once that is out, this can be closed. It works in IE with that change)

for now you can use parcel's --no-hmr option to get going without the non-worky code injected

(but once that is out, this can be closed. It works in IE with that change)

Actually @tonkotsuboy鈥檚 fix was merged 18 hours ago 馃槂 馃槆

I鈥檓 gonna go ahead and close the issue. As always, feel free to comment if you think we need to reopen it!

馃殌 See: #227

For me, Parcel is still generating JS code with arrow functions which makes the code not work in IE11.
I had to do an extra babel step before parcel build.
Shouldn't parcel already be using babel to transform arrow function syntax? Then why isn't it doing that for me?

I'm calling it like this:

parcel build index.html --public-url ./

@Boscop I'm pretty sure parcel doesn't build for old IE versions from default, you can configure browser targets in package.json and/or add a custom .babelrc
Parcel default: browsers: ['> 1%', 'last 2 versions', 'Firefox ESR']

  1. So when I have a .babelrc file, parcel will use that one?

  2. Is this file ok?

{
  "presets": [
    ["env", {
      "targets": {
        "browsers": ["Explorer 11"]
      }
    }]
  ]
}

How would it look like if I want to define the browser targets in package.json?

@Boscop browserlist is using this standard: https://github.com/ai/browserslist
So in your case it would be IE 11

Thanks, so parcel will use the value of "browserslist" key in package.json and pass it onto babel?

Yes @Boscop

Was this page helpful?
0 / 5 - 0 ratings