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

Build with parcel #56

Merged
merged 2 commits into from Feb 18, 2020
Merged

Build with parcel #56

merged 2 commits into from Feb 18, 2020

Conversation

kadikraman
Copy link
Owner

Fixes #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

  1. Checkout the branch
  2. yarn && yarn compile
  3. Copy the contents of the dist folder to your project ./node_modules/draftjs-md-converter/src

@NLSVTN
Copy link

NLSVTN commented Feb 11, 2020

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.

@kadikraman
Copy link
Owner Author

Oops, that was a typo, I did mean copy it to /dist.

Thanks for validating, I'll get this released now!

@kadikraman kadikraman merged commit e8ff797 into master Feb 18, 2020
@kadikraman kadikraman deleted the chore/use-parcel-for-bundling branch February 18, 2020 22:41
@kadikraman
Copy link
Owner Author

Released in v1.4.0 🎉

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

Successfully merging this pull request may close these issues.

Identifier '_toConsumableArray' has already been declared
2 participants