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.

Provide ES5 version for browser environment

See original GitHub issue

Hi @sindresorhus. Can you please provide ES5 version so it can work in older browsers that doesn’t support arrow functions and other goodies. I use webpack and babel-loader in my project but I don’t transpile any modules from node_modules directory:

  test: /\.js$/,
  exclude: /node_modules/,
  loader: 'babel-loader',
}

So… it would be to at least have a choice between ES5 and ES6 version. Thanks 😃

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:12 (8 by maintainers)

github_iconTop GitHub Comments

1reaction
SamVerschuerencommented, Mar 24, 2017

We aim for Node.js, not the browser. You can find a more detailed explanation here https://github.com/sindresorhus/ama/issues/446

0reactions
sindresorhuscommented, Mar 25, 2017

@stevemao You know could have actually made a useful module if you checked the “engine” field instead.

Read more comments on GitHub >

github_iconTop Results From Across the Web

After build via Webpack 5 app stoped working on Internet ...
From the webpack guide To v5 from v4, it says: By default, webpack's runtime code uses ES2015 syntax to build smaller bundles.
Read more >
Target
Compile for specified ECMAScript version. Examples: es5, es2020. For example, when the target is set to "electron-main" , webpack includes multiple electron ...
Read more >
JavaScript modules - MDN Web Docs
This guide gives you all you need to get started with JavaScript module syntax.
Read more >
How to transpile ES modules with webpack and Node.js
Learn how webpack interacts with and supports ES modules in this deep dive tutorial on transpilation in Node.js.
Read more >
ES5 to ESNext — here's every feature added to JavaScript ...
JScript (the Microsoft scripting dialect), since at the time JavaScript was supported only by Netscape and the browser wars were at their peak, ......
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