当前位置:网站首页>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);边栏推荐
- Redis series (3) - sentry highly available
- Recommend a distributed JVM monitoring tool, which is very practical!
- R language Quantitative Ecology redundancy analysis RDA analysis plant diversity species data visualization
- Common MySQL commands of installation free version
- What if the database table structure changes? Smartbi products support one click synchronization
- JS clothing photo album case
- Data modeling technology of Business Intelligence BI
- Why are more and more people studying for doctors? Isn't it more and more difficult to graduate a doctor?
- Leetcode weekly buckle 281
- Paper sharing | self supervised learning paper jointly released by Yann Lecun and read by engineers
猜你喜欢

Project Management Guide: tips, strategies and specific practices

Creating a new MySQL user in Amazon RDS environment - creating a new MySQL user in Amazon RDS environment

Solve the problem that the MapReduce program console does not have log information warn please initialize the log4j system properly
Paper sharing | self supervised learning paper jointly released by Yann Lecun and read by engineers

Leetcode weekly buckle 281

Regression testing strategy for comprehensive quality assurance system

Six configuration management tools that administrators must know

360 digital released information security trends in January: 120000 fraud risks were captured and users were reminded 2.68 million times

What is decision intelligence?

Seven strategies for successfully integrating digital transformation
随机推荐
Microservice system design -- data model and system architecture design
Usage of typedef enum (enumeration)
Digital trend analysis of B2B e-commerce market mode and trading capacity in electronic components industry
Graph traversal (BFS and DFS) C language pure handwriting
Easynvr fails to use onvif to detect the device. What is the reason why "no data" is displayed?
Uniapp wechat applet calls mobile map to navigate to the target point
Eight recommended microservice testing tools
Business leaders compete for CIO roles
Get the actual name of the method parameter through the parameter
Three indicators to help you measure the effectiveness of digital transformation
Is there a security risk in opening an account online? What to do if the business department opening an account nearby is far away from home. Is there any capital requirement for opening an account?
Crmeb multi merchant PC packaging tutorial
Microservice system design -- interface document management design
next_ Permutation full permutation function
Mental models: the best way to make informed decisions - farnam
Sword finger offer 10- ii Frog jumping on steps
Rapidssl getting started SSL certificate
Window object
2022 network security C module of the secondary vocational group scans the script of the surviving target aircraft (municipal, provincial and national)
About pyqt5 to realize paging function (one window implements different interfaces)