@tsconfig/esm

A base TSConfig for working with ESM.

Usage no npm install needed!

<script type="module">
  import tsconfigEsm from 'https://cdn.skypack.dev/@tsconfig/esm';
</script>

README

A base TSConfig for working with ESM.

Add the package to your "devDependencies":

npm install --save-dev @tsconfig/esm
yarn add --dev @tsconfig/esm

Add to your tsconfig.json:

"extends": "@tsconfig/esm/tsconfig.json"

The tsconfig.json:

{
  "$schema": "https://json.schemastore.org/tsconfig",
  "display": "ESM",

  "compilerOptions": {
    "module": "es2022"
  }
}

You can find the code here.