Skip to content

Commit 202b649

Browse files
authored
fix json imports in docs (#242)
1 parent a7c4f65 commit 202b649

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

website/docs/basics/getting-started.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ Now to initialise a contract we will import the `ElectrumNetworkProvider` and `C
108108

109109
```javascript
110110
import { ElectrumNetworkProvider, Contract } from 'cashscript';
111-
import artifact from './TransferWithTimeout.json';
111+
import artifact from './TransferWithTimeout.json' with { type: 'json' };
112112
import { alicePub, bobPub } from './keys.js';
113113

114114
// Initialise a network provider for network operations

website/docs/sdk/instantiation.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ import { Contract, ElectrumNetworkProvider } from 'cashscript';
4242
import { compileFile } from 'cashc';
4343

4444
// Import the artifact JSON
45-
import P2PKH from './p2pkh.json';
45+
import P2PKH from './p2pkh.json' with { type: 'json' };
4646

4747
// Or compile a contract file
4848
const P2PKH = compileFile(new URL('p2pkh.cash', import.meta.url));

0 commit comments

Comments
 (0)