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

Split repo into separate modules for each provider #13

Open
MCozhusheck opened this issue Jun 10, 2024 · 0 comments
Open

Split repo into separate modules for each provider #13

MCozhusheck opened this issue Jun 10, 2024 · 0 comments

Comments

@MCozhusheck
Copy link
Contributor

MCozhusheck commented Jun 10, 2024

Importing Tari.js into a another project requires some polyfill, in case of my React app with vite I had to add plugin vite-plugin-node-polyfills and add it to the vite.config.ts

import { defineConfig } from "vite";
import react from "@vitejs/plugin-react";
import { nodePolyfills } from "vite-plugin-node-polyfills";

export default defineConfig({
  plugins: [
    react(),
    nodePolyfills({ include: ["events", "stream", "util", "buffer"] }),
  ],
});

It was only required by metamask provider which I didn't use so it only increased bundle size of my app.

One solution to this could be splitting this repo into smaller ones so configuration would only be required If used metamask

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