Open kevjin opened 1 year ago
did you manage to fix the issue with rollup?
facing same issue.
iirc we did a weird hack where we did a find and replace after the vite build, to fix the JS
the vite build step optimizes the pre-build uniswap modules and messes up with the imports. not sure if the peer dependency is the real issue. but I created a vite.config that handles the import in dev and prod env.
const config = defineConfig({
optimizeDeps: {
exclude: ['jsbi'],
include: ['@uniswap/universal-router-sdk > jsbi'],
},
build: {
commonjsOptions: {
requireReturnsDefault: (e) => e.includes('jsbi')
},
},
...
});
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 Can we move JSBI as a direct dependency instead of as a peer dependency? It's causing some issues for us when using certain bundlers, where some of the project code cannot find the JSBI library. IMO it should be a direct dependency anyways, since
smart-order-router
directly usesJSBI
. Thank you!