[Proposal] Set target to ES5
See original GitHub issueHave you considered changing the build target to ES5 instead of ES6 so that this library works across more browsers?
Alternatively, you can ship 2 different builds (one with target=ES5 and one with target=ES6), I’ve seen some other libraries do this and then as a client, I could do import useLocalStorageState from "use-local-storage-state/es5"
.
Issue Analytics
- State:
- Created 3 years ago
- Comments:10 (6 by maintainers)
Top Results From Across the Web
Proposal: set target to es6 by default for tsserver · Issue #6398
Hello, For now, you have to specify the target in tsconfig.json when you want to use es6 features in tsserver It would be...
Read more >babel/preset-env
babel/preset-env` is a smart preset that allows you to use the latest JavaScript without needing to micromanage which syntax transforms (and optionally, ...
Read more >tsconfig target set to es5 but still uses let & const
I am trying to use UglifyJS on code generated by tsc. The target is set to es5 but the generated code still uses...
Read more >Documentation - Decorators - TypeScript
With the introduction of Classes in TypeScript and ES6, there now exist certain scenarios that require additional features to support annotating or ...
Read more >Content Types - ESBuild
This loader is enabled by default for .js , .cjs , and .mjs files. The .cjs extension is used by node for CommonJS...
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
@callumlocke @Luccasoli This issue is not related to the ES5 target. I created a new issue for that – #20. I fixed the issue in a new 8.0.0 release. You can upgrade now but you should do it manually because the
^7.0.0
constraint doesn’t allow it.I thought a lot about this. I decided to not add support for ES5. These are my arguments: