🐛 fix(vscode): 修复 0.2.270 装上后激活失败:jsonc-parser 改打 ESM 版,打包时先试加载产物

This commit is contained in:
cruldra committed 2026-10-13 11:36:24 +11:00
1 parent a7b85b4370
commit 6d419210c6
3 files changed
+37 -1

No files matched your search

+3
View File
@@ -18,6 +18,9 @@ const options = {
external: ['vscode', 'proxy-agent'],
format: 'cjs',
platform: 'node',
// node 平台默认先认 package.json 的 main,改成先认 module(ESM 入口):jsonc-parser 这类包的 main 是 UMD 版,
// 运行时才 require 自家的 ./impl/*,esbuild 打不进包,装上就加载失败;ESM 版的 import 能整个打进来
mainFields: ['module', 'main'],
target: 'node20',
sourcemap: !production,
minify: production,