当前位置:网站首页>Vite+web3: referenceerror: process is not defined
Vite+web3: referenceerror: process is not defined
2022-06-24 18:38:00 【Ren Lei ABC】
The recent use vite Scaffolding a blockchain project , need web3 This dependency Library , But introduce... Into the project web3 after , There is an error :

The solution is vite The configuration file vite.config.js It's equipped with :
// vite.config.js
import { defineConfig } from 'vite'
export default defineConfig({
⋮
resolve: {
alias: {
web3: 'web3/dist/web3.min.js',
},
// or
alias: [
{
find: 'web3',
replacement: 'web3/dist/web3.min.js',
},
],
},
})Then it can be introduced normally :
import web3 from 'web3';
console.log(web3);边栏推荐
- What makes data analysts good- Cassie Kozyrkov
- Vite+web3:报错出现ReferenceError: process is not defined
- Business leaders compete for CIO roles
- Selection (033) - what is the output of the following code?
- Online sequence flow chart making tool
- Rapidssl getting started SSL certificate
- ASP. Net hosting uploading file message 500 error in IIS
- Two micro service interviews where small companies suffer losses
- SAP license:sap s/4hana is the answer
- JS string method
猜你喜欢

Conception de systèmes de micro - services - construction de sous - services

Regression testing strategy for comprehensive quality assurance system
Ultimate Guide: comprehensive analysis of log analysis architecture of Enterprise Cloud native PAAS platform

DOM (document object model)

What is decision intelligence?

Window object

Redis learning -- list of redis operations

"2022" plans to change jobs and raise salary. It is necessary to ask interview questions and answers - browser

Seven strategies for successfully integrating digital transformation
Paper sharing | self supervised learning paper jointly released by Yann Lecun and read by engineers
随机推荐
Easygbs video platform TCP active mode streaming exception repair
Five advantages and disadvantages of Bi
Six configuration management tools that administrators must know
The mixed calculation of rpx and PX in JS by the uniapp applet
What are the grades of financial products?
Microservice system design -- data model and system architecture design
Crmeb multi merchant PC packaging tutorial
Top ten popular codeless testing tools
DOM (document object model)
Uniapp wechat applet calls mobile map to navigate to the target point
Business leaders compete for CIO roles
Tencent cloud won the "trusted cloud technology best practice - virtualization"
An analysis of the comments on the TV series Douban by procedural apes
Mariana Trench, Facebook's open source code analysis tool
What makes data analysts good- Cassie Kozyrkov
Huitongda officially landed at the Hong Kong Stock Exchange: the gross profit margin continued to decline, and the book value of several shareholders still suffered losses
Industry Cloud video editing software
SAP license: what is ERP supply chain
如何在 R 中创建线性模型预测区间 并可视化
Flex box flex attribute