Closed qinhua closed 3 months ago
I tried to modify the Vite configuration file for walletConnect, and it seems to have been resolved so far.
rollupOptions: {
output: {
// https://rollupjs.org/configuration-options/#output-manualchunks
manualChunks(id: string) {
if (id.includes('node_modules') && id.includes('walletconnect')) {
return id
.toString()
.split('node_modules/')[1]
.split('/')[0]
.toString()
}
}
}
}
}
After connecting to walletConnect and using
Vite Build
to package and deploy online, I encountered the following error when clicking the Connect button. However, everything was normal during local development. How can I handle this path issue? I am currently usingnpm
to execute package scripts(npm run build). How can I modify the Vite. config. ts file to solve this problem?my source code: