Skip to content

Commit 4e6a439

Browse files
committed
fix(playground): commonjs error message
1 parent 1d5d04d commit 4e6a439

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

packages/playground/src/app/components/Editor.tsx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -145,6 +145,10 @@ export function Editor({
145145
"import { ccc } from '@ckb-ccc/core'; export function render(...msgs: unknown[]): Promise<void>; export const signer: ccc.Signer; export const client: ccc.Client;",
146146
"file:///node_modules/@ckb-ccc/playground/index.d.ts",
147147
);
148+
monaco.languages.typescript.typescriptDefaults.addExtraLib(
149+
'{ "type": "commonjs" }',
150+
"file:///node_modules/@ckb-ccc/playground/package.json",
151+
);
148152

149153
monaco.languages.register({ id: "typescript" });
150154
createHighlighter({

0 commit comments

Comments
 (0)