Vite Installation
Last updated
yarn add vite-plugin-node-polyfills -Dimport { defineConfig } from "vite"
import react from "@vitejs/plugin-react"
import { nodePolyfills } from "vite-plugin-node-polyfills"
export default defineConfig({
plugins: [
react(),
nodePolyfills()
]
})import { SquidWidget } from "@0xsquid/widget";
function App() {
return (
<div>
<SquidWidget
config={{
integratorId: "<your-integrator-id>",
apiUrl: "https://v2.api.squidrouter.com",
// Add other configuration options here
}}
/>
</div>
);
}
export default App;yarn dev# Clone the repo
git clone https://github.com/0xsquid/widget-integrations.git
# Move to the Vite example folder
cd packages/squid-v2/vite/vite-5.5-typescript
# Install dependencies
yarn install
# Start the development server
yarn dev