From 5f681fe1b13644335c06e1582500947ef7db09c3 Mon Sep 17 00:00:00 2001 From: Yusinto Ngadiman Date: Mon, 24 Jun 2024 15:43:30 -0700 Subject: [PATCH] fix: Pin jsonc-parser to fix cloudflare rollup build. (#485) Seems like v3.3.0 of jsonc-parser causes an error in rollup-plugin-esbuild: ```bash [!] SyntaxError: Named export 'parse' not found. The requested module 'jsonc-parser' is a CommonJS module, which may not support all module.exports as named exports. CommonJS modules can always be imported via the default export, for example using: import pkg from 'jsonc-parser'; const { parse } = pkg; /js-core/node_modules/rollup-plugin-esbuild/dist/index.mjs:11 import { parse } from "jsonc-parser"; ^^^^^ ``` --- package.json | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/package.json b/package.json index 36f1a9f94..acca989dd 100644 --- a/package.json +++ b/package.json @@ -53,5 +53,9 @@ "typedoc": "0.25.0", "typescript": "5.1.6" }, - "packageManager": "yarn@3.4.1" + "packageManager": "yarn@3.4.1", + "//": "Pin jsonc-parser because v3.3.0 breaks rollup-plugin-esbuild", + "resolutions": { + "jsonc-parser": "3.2.0" + } }