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 doesn't support template literals

See original GitHub issue

When using this on IE11 it throws on one of your error:

throw new TypeError(`Cannot perform '${trap}' on a proxy that has been revoked`);

Bundling your library with “production” environment produces the following error:

Error: vendor.js from UglifyJs
Unexpected token: name (lastRevokeFn) [vendor.js:57606,6]

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:3
  • Comments:9 (2 by maintainers)

github_iconTop GitHub Comments

4reactions
ThiefMastercommented, Apr 24, 2018

Can this please be fixed properly? IE11 support is the whole point of using this polyfill - and then you don’t transpile to something IE11 can actually use?!

3reactions
ashthorntoncommented, Oct 18, 2018

I ran into the same issue as @wyqydsyq.

Until this is resolved my solution is to include passing the specific node_module through Babel in my webpack config:

rules: [
    {
        test: /\.js$/,
        exclude: /node_modules(?!\/proxy-polyfill)/,
        loader: 'babel-loader',
        options: {
            presets: ['es2015']
        }
    }
]
Read more comments on GitHub >

github_iconTop Results From Across the Web

Template literals syntax is not working in IE11 - Stack Overflow
If you look at the ECMAScript 6 compatibility table, you'll see that template literals are not supported by IE11. The "use strict"; statement...
Read more >
Cross Browser Compatibility of ES6 Template Literals ...
ES6 Template Literals (Template Strings) is Not Supported on Internet Explorer 11. If you use ES6 Template Literals (Template Strings) and ...
Read more >
JS error in Internet Explorer. Template literals (backtick) not ...
Problem/Motivation The 2.0.2 version of browser_detect.js uses backticks for template literals which is throwing an error in Internet ...
Read more >
Template literals (Template strings) - JavaScript | MDN
Template literals are literals delimited with backtick (`) characters, allowing for multi-line strings, string interpolation with embedded ...
Read more >
ES6 Template Literals (Template Strings) - CanIUse
"Can I use" provides up-to-date browser support tables for support of front-end web technologies on desktop and mobile web browsers.
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