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

I am using react-dropzone is my remote app & getting this error "useDropzone is not a function", while if i remove it from my vite config, project builds & runs successfully #1319

Open
ubaidrajputtmetastaq opened this issue Sep 18, 2023 · 1 comment
Labels

Comments

@ubaidrajputtmetastaq
Copy link

This is my Vite config file.

import { defineConfig } from "vite";
import react from "@vitejs/plugin-react";
import federation from "@originjs/vite-plugin-federation";

export default defineConfig({
plugins: [
react(),
federation({
name: "remote",
filename: "remoteEntry.js",
exposes: {
"./Storebuilder": "./src/builder",
},
shared: [
"react",
"react-dom",
"axios",
"immer",
"react-beautiful-dnd",
"react-dropzone",
"react-hook-form",
"react-modal",
"zustand",
],
}),
],
build: {
modulePreload: false,
target: "esnext",
minify: false,
cssCodeSplit: false,
},
});

Please see the error on my console with the attached image.
Screenshot 2023-09-18 at 1 27 31 PM

I am able to run my app if I remove "react-dropzone" from the shared config.

Please get back to me on this.

@JClackett
Copy link

Yeah, also have the exact same issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants