Changed target of TypeScript compilation to es2016

Partially addressed to #745
This commit is contained in:
Evgeniy Timokhov 2022-03-03 09:45:37 +00:00
parent af54e3f71d
commit 586512ecb6
3 changed files with 13 additions and 9 deletions

View File

@ -4,11 +4,11 @@ module.exports = [
{
name: 'ESM',
path: 'dist/lightweight-charts.esm.production.js',
limit: '45.3 KB',
limit: '42.9 KB',
},
{
name: 'Standalone',
path: 'dist/lightweight-charts.standalone.production.js',
limit: '45.9 KB',
limit: '43.5 KB',
},
];

View File

@ -5,12 +5,7 @@
"importHelpers": true,
"lib": [
"dom",
"es2015.collection",
"es2015.core",
"es2015.iterable",
"es2015.symbol.wellknown",
"es2016.array.include",
"es5"
"es2016"
],
"module": "esnext",
"moduleResolution": "node",
@ -24,7 +19,7 @@
"rootDir": "./",
"strict": true,
"stripInternal": false,
"target": "es5",
"target": "es2016",
"typeRoots": [
"./src/typings",
"node_modules/@types"

View File

@ -6,6 +6,15 @@ sidebar_position: 0
# Getting started
## Requirements
First of all, Lightweight Charts is _a client-side_ library.
This means that it does not and cannot work on the server-side (i.e. NodeJS), at least out of the box.
The code of `lightweight-charts` package is targeted to _es2016_ language specification.
Thus, all the browsers you need to work with should support this language revision (see [this compatibility table](https://kangax.github.io/compat-table/es2016plus/)).
If you need to support the previous revisions, you could try to setup a transpilation of the package to the target you need to support in your build system (e.g. by using Babel).
## Installation
The first thing you need to do to use `lightweight-charts` is to install it from [npm](https://www.npmjs.com/):