Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Vite build breaks smart-order-router app #553

Open
abdxzi opened this issue Apr 26, 2024 · 0 comments
Open

Vite build breaks smart-order-router app #553

abdxzi opened this issue Apr 26, 2024 · 0 comments

Comments

@abdxzi
Copy link

abdxzi commented Apr 26, 2024

  • I'm submitting a ...
    [x] bug report
    [ ] feature request
    [ ] question about the decisions made in the repository
    [ ] question about how to use this project

  • Summary

i am using smart-order-router with React and vite. It works perfectly in development mode. But after build (vite build) program breaks and shows an error in the console:

Uncaught TypeError: r0.BigInt is not a function
    at index-C6zSvWuB.js:9539:14812
    at index-C6zSvWuB.js:9540:32116

This is my package.json:

{
  "name": "client",
  "private": true,
  "version": "0.0.0",
  "type": "module",
  "scripts": {
    "dev": "vite",
    "build": "vite build",
    "lint": "eslint . --ext js,jsx --report-unused-disable-directives --max-warnings 0",
    "preview": "vite preview"
  },
  "dependencies": {
    "@uniswap/sdk-core": "^4.2.1",
    "@uniswap/smart-order-router": "^3.28.7",
    "ethers": "5.7",
    "jsbi": "3.2",
    "react": "^18.2.0",
    "react-dom": "^18.2.0",
  },
  "devDependencies": {
    "@types/react": "^18.2.66",
    "@types/react-dom": "^18.2.22",
    "@vitejs/plugin-react": "^4.2.1",
    "eslint": "^8.57.0",
    "eslint-plugin-react": "^7.34.1",
    "eslint-plugin-react-hooks": "^4.6.0",
    "eslint-plugin-react-refresh": "^0.4.6",
    "vite": "^5.2.0"
  }
}

What causes the problem ?

@abdxzi abdxzi changed the title Vite build breaks Vite build breaks smart-order-router app Apr 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant