Comments (1)
You'll need to polyfill some packages that have not been packaged in vite:
// vite.config.js
export default {
resolve: {
alias: {
'crypto': 'crypto-browserify',
'buffer': 'buffer/',
'stream': 'readable-stream',
}
},
}
And you also need to add global variable in the very beginning of your code:
window.global ||= window;
from tronweb.
Related Issues (20)
- Typescript support is needed! HOT 1
- what is `energy_penalty` returned by triggerConstantContract? HOT 5
- eth
- delegateResource from active permsion HOT 8
- `triggerConstantContract` and `estimateenergy` do not return the correct energy amounts HOT 8
- How can I get a public key? HOT 4
- Error in Interact with the contract "Property 'balanceOf' does not exist on type 'Contract'. HOT 5
- node.js, get error when want to use
- require() of ES Module HOT 6
- CORS error HOT 17
- A typo in `latest_operation_time`? HOT 1
- Uncaught TypeError: Cannot destructure property 'Transaction' of 'globalThis.TronWebProto' as it is undefined. HOT 5
- Unable to broadcast transaction
- www/wwwroot/yhnew/yuanma2/public/index.php QUERY_STRING s=/index/links/index.html
- Error [ERR_REQUIRE_ESM]: require() of ES Module secp256k1/index.js from TronWeb.node.js HOT 12
- Error tronWeb.trx.getBalance(address) HOT 6
- [Feature] Think about separate TronWeb into 2 versions - For NodeJS and For Browser. HOT 5
- Project don't have stable version for production (axios, @noble/secp256k1) HOT 2
- multisign transactionBuilder.sendTrx not send any transaction
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from tronweb.