Search code examples
reactjsrollupjsreact-beautiful-dnd

How to get the correct build of react-beautiful-dnd library?


I did a fork for react-beautiful-dnd github project and I added some features but when I build my fork using yarn run build and use the new dist in my project I get a compile issue

./node_modules/suivi-beautiful-dnd-with-custom-payload/dist/react-beautiful-dnd.esm.js
Module not found: Can't resolve './view/drag-drop-context/index.js' in 'C:\Users\tahas\OneDrive\Bureau\Backend\Statsh\Statsh.Frontend_POC\node_modules\suivi-beautiful-dnd-with-custom-payload\dist'

I saw that there is a difference between my build in npm and the build provided by react-beautiful-dnd npm but I did not figure out why I'm getting a difference or I didn't change the build config in package.json file ?

Screenshot of my npm build :

image

Screenshot of the build provided by react-beautiful-dnd npm :

image

How to solve that issue ?


Solution

  • I did my own boilerplate to build the project and it works now ! https://github.com/ProNoob702/Boilerplate-to-build-custom-react-beautiful-dnd