Skip to content

Commit

Permalink
fix: Pin jsonc-parser to fix cloudflare rollup build. (#485)
Browse files Browse the repository at this point in the history
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";
         ^^^^^
```
  • Loading branch information
yusinto authored Jun 24, 2024
1 parent 5775ee7 commit 5f681fe
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -53,5 +53,9 @@
"typedoc": "0.25.0",
"typescript": "5.1.6"
},
"packageManager": "[email protected]"
"packageManager": "[email protected]",
"//": "Pin jsonc-parser because v3.3.0 breaks rollup-plugin-esbuild",
"resolutions": {
"jsonc-parser": "3.2.0"
}
}

0 comments on commit 5f681fe

Please sign in to comment.