Skip to content

Commit 5f681fe

Browse files
authored
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"; ^^^^^ ```
1 parent 5775ee7 commit 5f681fe

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

package.json

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,5 +53,9 @@
5353
"typedoc": "0.25.0",
5454
"typescript": "5.1.6"
5555
},
56-
"packageManager": "[email protected]"
56+
"packageManager": "[email protected]",
57+
"//": "Pin jsonc-parser because v3.3.0 breaks rollup-plugin-esbuild",
58+
"resolutions": {
59+
"jsonc-parser": "3.2.0"
60+
}
5761
}

0 commit comments

Comments
 (0)