Comments (4)
I think that transpiling code is something that must be done by the end user in this case, since there is no way for us to know exactly which browsers/environments they are targeting. It's my opinion that it's better for all code on npm to use the latest language features, and then someone building a website can configure their build process to transpile accordingly...
from clipboard-copy.
Usual babel setup only transpiles project's source code and doesn't touch node_modules. Most of the libraries target ES5 as a base case and sometimes they also provide additional target like esnext.
I understand what you are saying, but in my opinion it is unexpected of library not to support ES5.
from clipboard-copy.
Transpiling async
/await
syntax comes with a very large overhead, which will probably balloon the size of this library way over the 508 B gzipped that this library currently comes in at. It would be interesting to test and see the difference...
It seems like a bad approach that all newer browsers should pay the price of running older code, even on websites that aren't even supporting older browsers?
from clipboard-copy.
I thought of something like this https://github.com/xobotyi/scrollbar-width/blob/master/package.json#L33
Here you have 3 targets, one of them "main" is es5.
from clipboard-copy.
Related Issues (20)
- Change README to a Promise HOT 1
- Source for empty promise rejection? HOT 1
- Thanks for this HOT 1
- Does not work on Safari HOT 2
- The npm version has the old readme HOT 1
- Typescript definition issue HOT 9
- Copy not working in chrome version 72 HOT 2
- Copy not working on non-https dev server HOT 1
- The latest version (3.0.0) is not working in Cordova on Android 7 HOT 1
- Unhandled Promise Rejection: undefined HOT 5
- Not working in android opera browser HOT 1
- Doesn't work on Fb Messenger/Instagram in-app browser on Android device HOT 1
- Line breaks (\n) are not working on safari HOT 1
- Not working inside cross-domain iframe HOT 4
- DOMException is not supported by Edge HOT 1
- v4 breaks IE11 compatibility HOT 1
- Paste support?
- not working on Mac safari 15.0 HOT 6
- Can't copy arabic text to the top position
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from clipboard-copy.