Closed kadikraman closed 4 years ago
I faced the same issue and asked Babel slack channel whether they know what to do and posted the question also on stackoverflow:
https://stackoverflow.com/questions/60105716/identifier-toconsumablearray-has-already-been-declared
I tried your proposed solution with the present branch chore/use-parcel-for-bundling but used npm instead:
git checkout origin/chore/use-parcel-for-bundling
npm i
npm run compile
Then I copied the contents of the dist folder into my _node_modules/draftjs-md-converter/src/. It was not working, the error stayed the same for me. Then I saw that the error is actually happening in the node_modules/draftjs-md-converter/dist/_ and not in src, so I copied newly generated index.js there and it started to work.
Oops, that was a typo, I did mean copy it to /dist
.
Thanks for validating, I'll get this released now!
Released in v1.4.0 🎉
Fixes https://github.com/kadikraman/draftjs-md-converter/issues/55
The babel build step adds a duplicate function declaration, which errors then added to a web project.
Fixing this by moving to build with parcel instead of babel. It's simpler to configure and you get code minification and source maps for free.
How to test this
yarn && yarn compile
dist
folder to your project./node_modules/draftjs-md-converter/src