You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When using the @web3-onboard/walletconnect package with Vite, the package works as expected in development mode. However, when building the application for production, the following error is thrown: "To use QR modal, please install @walletconnect/modal package".
Actual Behavior
The @walletconnect/modal package is not included in the production build, causing the application to throw an error when trying to use it.
Possible Solution
I've tried to force Vite to include the package in the build using the optimizeDeps.include option in the vite.config.js file, but this did not resolve the issue.
Additional Context
Here's the relevant part of my vite.config.ts file:
importsolidfrom"solid-start/vite";importUnoCSSfrom"unocss/vite";import{defineConfig}from"vite";importsolidPluginfrom"vite-plugin-solid";importsolidSvgfrom"vite-plugin-solid-svg";importtsconfigPathsfrom"vite-tsconfig-paths";importprocessfrom"node:process";exportdefaultdefineConfig({plugins: [// my plugins...],optimizeDeps: {include: ["@walletconnect/modal","@web3-onboard/walletconnect"]}// rest of my config...});
### ExpectedBehaviorThe`@walletconnect/modal`packageshouldbeincludedintheproductionbuildandworkasexpected,justlikeindevelopmentmode.
### StepsToReproduce1.Install`@walletconnect/modal`and`@web3-onboard/walletconnect`inaViteproject.2.Usethepackageintheapplication.3.Runtheapplicationindevelopmentmode-everythingworksasexpected.4.Buildtheapplicationforproduction.5.Servetheproductionbuildlocally.6.Observetheerrormessage.note: Iaminitializingonboardifitisnotserver
### Whatpackageiseffectedbythisissue?
@web3-onboard/core
### Isthisabuildoraruntimeissue?
Build
### PackageVersion2.7.15
### NodeVersion18.16.0
### Whatbrowsersareyouseeingtheproblemon?
Chrome
### Relevantlogoutput```shellN/A
Anything else?
No response
Sanity Check
If this is a build issue, I have included my build config. If this is a runtime issue, I have included reproduction steps and/or a Minimal, Reproducible Example.
The text was updated successfully, but these errors were encountered:
Current Behavior
Description
When using the
@web3-onboard/walletconnect
package with Vite, the package works as expected in development mode. However, when building the application for production, the following error is thrown: "To use QR modal, please install @walletconnect/modal package".Actual Behavior
The
@walletconnect/modal
package is not included in the production build, causing the application to throw an error when trying to use it.Possible Solution
I've tried to force Vite to include the package in the build using the
optimizeDeps.include
option in thevite.config.js
file, but this did not resolve the issue.Additional Context
Here's the relevant part of my
vite.config.ts
file:Anything else?
No response
Sanity Check
The text was updated successfully, but these errors were encountered: