Provide ES5 version for browser environment
See original GitHub issueHi @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:
- Created 6 years ago
- Comments:12 (8 by maintainers)
Top 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 >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
We aim for Node.js, not the browser. You can find a more detailed explanation here https://github.com/sindresorhus/ama/issues/446
@stevemao You know could have actually made a useful module if you checked the “engine” field instead.