From 358a3d1eb4ef80d7d1befcbe4af62b7b2b8fb447 Mon Sep 17 00:00:00 2001 From: Gary Ritchie Date: Fri, 27 Mar 2026 09:03:18 -0600 Subject: [PATCH] Update ES target from ES6/ES2018 to ES2022 All current Obsidian platforms (Electron desktop, iOS 16+ WKWebView, Android auto-updating WebView) support ES2022. Aligns both tsconfig and esbuild targets together. --- esbuild.config.mjs | 2 +- tsconfig.json | 6 ++---- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/esbuild.config.mjs b/esbuild.config.mjs index 1c74a14..1f86f92 100644 --- a/esbuild.config.mjs +++ b/esbuild.config.mjs @@ -33,7 +33,7 @@ const context = await esbuild.context({ "@lezer/lr", ...builtinModules], format: "cjs", - target: "es2018", + target: "es2022", logLevel: "info", sourcemap: prod ? false : "inline", treeShaking: true, diff --git a/tsconfig.json b/tsconfig.json index 222535d..ae49fac 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -4,7 +4,7 @@ "inlineSourceMap": true, "inlineSources": true, "module": "ESNext", - "target": "ES6", + "target": "ES2022", "allowJs": true, "noImplicitAny": true, "noImplicitThis": true, @@ -19,9 +19,7 @@ "useUnknownInCatchVariables": true, "lib": [ "DOM", - "ES5", - "ES6", - "ES7" + "ES2022" ] }, "include": [