From 70a730bfb237c467bb0077fb09e341d01069fe52 Mon Sep 17 00:00:00 2001 From: Caleb Evans Date: Fri, 7 Jun 2024 08:54:52 -0700 Subject: [PATCH] Use es2020 for TypeScript modules --- rollup.config.mjs | 2 +- tsconfig.json | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/rollup.config.mjs b/rollup.config.mjs index c89bcb7..f6f4940 100644 --- a/rollup.config.mjs +++ b/rollup.config.mjs @@ -29,6 +29,6 @@ export default inputPaths.map((inputPath) => { }, }, ], - plugins: [commonjs(), esbuild({ minify: true })], + plugins: [commonjs(), esbuild({ minify: true, target: "es2020" })], }; }); diff --git a/tsconfig.json b/tsconfig.json index 671fa86..41b4902 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -1,14 +1,14 @@ { "compilerOptions": { - "target": "es2017", - "lib": ["es2017", "dom", "dom.iterable"], + "target": "es2020", + "lib": ["es2020", "dom", "dom.iterable"], "allowJs": true, "checkJs": true, "skipLibCheck": true, "forceConsistentCasingInFileNames": true, "noEmit": true, "esModuleInterop": true, - "module": "esnext", + "module": "es2020", "moduleResolution": "bundler", "resolveJsonModule": true, "isolatedModules": true,