react-dnd-scrolling icon indicating copy to clipboard operation
react-dnd-scrolling copied to clipboard

ESM only makes it impossible to use it with 15.x

Open OnkelTem opened this issue 2 years ago • 1 comments

When I install this package, the latest version of react-dnd (16.x) also gets installed while I already gave react-dnd (15.x). And that is super important because react-dnd 15.x was still compatible with normal js projects, while 16.x isn't. Making react-dnd-scrolling a ESM also breaks things, like react-dnd 16.

Module not found: ESM packages (react-dnd-scrolling) need to be imported. Use 'import' to reference the package instead. https://nextjs.org/docs/messages/import-esm-externals

OnkelTem avatar Sep 21 '23 16:09 OnkelTem

require() of ES Module ...\node_modules\react-dnd\dist\index.js from ...\node_modules\react-dnd-scrolling\dist\index.cjs not supported. Instead change the require of index.js in ...\node_modules\react-dnd-scrolling\dist\index.cjs to a dynamic import() which is available in all CommonJS modules. 🤔

sKopheK avatar Oct 24 '24 18:10 sKopheK