widgets icon indicating copy to clipboard operation
widgets copied to clipboard

Uniswap Widgets components for Vue.js/Nuxt.js

Open wukongproject opened this issue 3 years ago • 9 comments

A Vue.js/Nuxt.js version of the Widgets is much needed and requested by devs. We can support.

wukongproject avatar May 29 '22 21:05 wukongproject

Same for Angular

ottman avatar May 30 '22 19:05 ottman

Please do, really need it

TrayHard avatar Jun 09 '22 22:06 TrayHard

Much need

Philword avatar Dec 08 '22 09:12 Philword

Would be great.

flexid avatar Dec 09 '22 15:12 flexid

Anyone know where the implement for vue.js?

viper-00 avatar Mar 27 '23 08:03 viper-00

There is any link or guide to implement Uniswap Widgets (swap widget) for nuxt 3 webapp?

valecss avatar Jul 04 '23 08:07 valecss

When will the Vue version of the widget be released!!

ssmmll880 avatar Oct 26 '23 02:10 ssmmll880

Bump

ghost avatar Nov 01 '23 15:11 ghost

You can get it running in vue using veaury.

There are some steps involved.

Install necessary packages: yarn add -D veaury @uniswap/widgets @fontsource-variable/inter vite-plugin-node-polyfills@^0.9.0

<script lang="ts" setup>
import '@fontsource-variable/inter';
//@ts-ignore
import { SwapWidget } from '@uniswap/widgets'
//@ts-ignore
import { applyReactInVue } from 'veaury';
const UniswapWidget = applyReactInVue(SwapWidget)
</script>

Then use it.

<UniswapWidget :defaultOutputTokenAddress="TOKEN_OUTPUT"></UniswapWidget>

Just make sure to note that there are errors running it on Vite, but the polyfills from here fixed it on our end.

import { nodePolyfills } from 'vite-plugin-node-polyfills' // ^0.9.0 worked for me

export default defineNuxtConfig({
  vite: {
    resolve: {
      alias: {
        jsbi: path.resolve(__dirname, "./node_modules/jsbi/dist/jsbi-cjs.js"),
      }
    },
    build: {
      commonjsOptions: {
        transformMixedEsModules: true,
      },
    },
    plugins: [
      nodePolyfills()
   ]
 }
});

itzaks avatar Nov 08 '23 14:11 itzaks