From f9e33d4c5d01abe68296748e8fe8c46daecba1d3 Mon Sep 17 00:00:00 2001 From: wujunchen Date: Mon, 27 Apr 2026 19:47:41 +0800 Subject: [PATCH] build: align tsconfig target and esbuild target to ES2022 Both were ES2020 while lib was already ES2022, creating a mismatch that could allow using APIs esbuild wouldn't polyfill. Obsidian 1.4+ runs Electron 25+ which fully supports ES2022. Change-Id: I732538280146c6a91cf52cc52ef124f6a364dc5e --- esbuild.config.mjs | 2 +- tsconfig.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/esbuild.config.mjs b/esbuild.config.mjs index 8e91675..a41f12f 100644 --- a/esbuild.config.mjs +++ b/esbuild.config.mjs @@ -16,7 +16,7 @@ const context = await esbuild.context({ bundle: true, platform: 'node', format: 'cjs', - target: 'es2020', + target: 'es2022', external, sourcemap: production ? false : 'inline', treeShaking: true, diff --git a/tsconfig.json b/tsconfig.json index 8bf43d2..6f423cc 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -1,7 +1,7 @@ { "compilerOptions": { "baseUrl": ".", - "target": "ES2020", + "target": "ES2022", "module": "CommonJS", "moduleResolution": "Node", "lib": ["ES2022", "DOM"],