Skip to content

Commit bdfb7c9

Browse files
authored
Add --force flag and mention dependency pre-bundling in Vite example readme (#56)
1 parent 8eeb61f commit bdfb7c9

File tree

2 files changed

+15
-1
lines changed

2 files changed

+15
-1
lines changed

examples/vite-react/README.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,18 @@
1+
### @dethcrypto/vite-react-example
2+
13
You can run the dev server in the example with `yarn dev` or build
24

35
If you copy the directory outside of eth-sdk repo, make sure to change `@dethcrypto` dependencies from relative
46
`file:../../` installs to newest released versions.
7+
8+
---
9+
10+
#### Vite dependency pre-bundling and codegen to node_modules
11+
12+
We run the dev server with `vite --force` to ensure re-bundling of dependencies when the dev server starts.
13+
14+
By default, eth-sdk emits generated types to `node_modules/.dethcrypto/eth-sdk-client`.
15+
16+
You can also change `config.outputPath` to somewhere outside of node_modules.
17+
18+
Read more at: https://vitejs.dev/guide/dep-pre-bundling.html

examples/vite-react/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"version": "0.0.0",
44
"private": true,
55
"scripts": {
6-
"dev": "concurrently --names \"hhat\",\"vite\" --c \"magenta,cyan\" \"hardhat node\" \"vite\"",
6+
"dev": "concurrently --names \"hhat\",\"vite\" --c \"magenta,cyan\" \"hardhat node\" \"vite --force\"",
77
"build": "tsc && vite build",
88
"serve": "vite preview",
99
"generate-types": "eth-sdk",

0 commit comments

Comments
 (0)