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

Drag-n-drop does not work with vite production builds, but does work in dev builds #324

Open
vezaynk opened this issue Nov 17, 2024 · 1 comment

Comments

@vezaynk
Copy link

vezaynk commented Nov 17, 2024

This is happening in a real project for me. I stripped it down to demonstrate a minimal example: https://github.com/vezaynk/dnd-vite-issue-demo

Description:

React-dnd with multiple back-ends does not function when a production build is made, but does work in dev builds.

Errors, logs, etc

The application renders and is otherwise interactive (aside from the issue described here). There are no errors/warnings/etc in the console.

Platforms affected:

I have limited devices to test on. I have only tested and had this happen on iOS.

Reproduction steps:

  1. Install dependencies: npm i
  2. Run dev build npm run dev -- --host
  3. Run production build npm run build && npm run preview -- --host
  4. Access both pages on a mobile devices (iOS safari)

Expected Results

Dragging the "Hello World!" text should generate a preview on both pages.

Actual Results

Dragging the "Hello World!" text only works on the page running from npm run dev.

@vezaynk
Copy link
Author

vezaynk commented Nov 17, 2024

It might be this issue, actually: react-dnd/react-dnd#3645

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