launchdarkly / js-core

LaunchDarkly monorepo for JavaScript SDKs
Other
14 stars 16 forks source link

fix: Pin jsonc-parser to fix cloudflare rollup build. #485

Closed yusinto closed 3 months ago

yusinto commented 3 months ago

Seems like v3.3.0 of jsonc-parser causes an error in rollup-plugin-esbuild:

[!] 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";
         ^^^^^