Closed florian-deroo closed 1 year ago
Hi! With the following code in development mode, everything works but when I go to production nothing works anymore:
const connection = new Connection(clusterApiUrl("devnet")); const metaplex = new Metaplex(connection); const nft = await metaplex.nfts().findAllByOwner({ owner: publicKey, }) console.log(nft)
I'm using ViteJS with this config
import { defineConfig } from "vite"; import react from "@vitejs/plugin-react"; // https://vitejs.dev/config/ export default defineConfig({ plugins: [react()], // Or svelte(), etc. resolve: { alias: { stream: "rollup-plugin-node-polyfills/polyfills/stream", }, }, define: { "process.env": process.env, }, });
with this repo you can reproduce the problem:
https://github.com/florian-deroo/test-project
Hi! With the following code in development mode, everything works but when I go to production nothing works anymore:
I'm using ViteJS with this config