If you’re using Vite.js with react and using the Dynamic SDK with Starknet, you may get a similar error to this one in your console:
This is because older versions of Vite don’t know how to resolve the starknet
module exports.
resolve
alias for starknet
using vite.config.js
To fix this we must modify the vite.config.js
file to add an alias for starknet
. Here is a minimal example config:
If you’re using Vite.js with react and using the Dynamic SDK with Starknet, you may get a similar error to this one in your console:
This is because older versions of Vite don’t know how to resolve the starknet
module exports.
resolve
alias for starknet
using vite.config.js
To fix this we must modify the vite.config.js
file to add an alias for starknet
. Here is a minimal example config: