question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

IE11 syntax error due to destructuring

See original GitHub issue

Current behavior

Using version 8.0.1 in IE11 I get a syntax error in the SweetAlert constructor due to destructuring. This causes my app not to load.

swal-error2

swal-error1

Expected behavior

Shouldn’t error in IE11

Live demo

I can’t replicate this issue with your template as it does seem to work in IE11. But using the latest version in my sandbox repo I get the same issue:

https://github.com/afisher88/sweetalert2-sandbox

I can get around this by transpiling my node_modules folder but I don’t really want to have to do this.

    rules: [
      {
        test: /\.(js|jsx)$/,
        exclude: /(node_modules)/, // Remove this line
        use: {
          loader: 'babel-loader',
          options: {
            presets: ['@babel/preset-env', '@babel/preset-react'],
            plugins: [
              '@babel/plugin-proposal-object-rest-spread',
              '@babel/transform-spread',
              '@babel/plugin-proposal-class-properties'
            ]
          }
        }
      },

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:1
  • Comments:5 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
limontecommented, Jan 28, 2019

🎉 This issue has been resolved in version 8.0.2 🎉

The release is available on:

Your semantic-release bot 📦🚀

0reactions
afisher88commented, Jan 29, 2019

No problem, thanks for fixing so quickly!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Destructuring assignment not working in IE 11 even after ...
Destructuring assignment not working in IE 11 even after using babel ... Fails on ({getState}), error in console is 'Expected Identifier' .
Read more >
IE11 and the Missing Polyfills - DEV Community ‍ ‍
Once you configured - "modern + IE11" it will remove polyfills for IE9-10, as well A LOT of polyfills for Android related browsers....
Read more >
[Solved]-ng-annotate error with Babel and destructuring-babel.js
I have similar problem, I just simply changed the order in gulp pipe to: babel --> annotate. ng-annotate does not support new JS...
Read more >
Syntax error in IE 11 - jQuery Forum
Hi there, My code works just fine in Chrome and Edge but in IE 11, I get syntax error at line var GDN....
Read more >
Vue instantsearch - Open Q&A - Algolia Community
SyntaxError: Expected identifier in ... it works now in Edge (thanks to stackoverflow). ... Another thing: I've just checked in IE11 your codepen ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found