Skip to content

fix(index): make sure to export the named exports #220

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

Merged
merged 1 commit into from
Jan 28, 2021

Conversation

remarkablemark
Copy link
Owner

Fixes #217

What is the motivation for this pull request?

fix(index): make sure to export the named exports

What is the current behavior?

#216 caused a regression where the named exports are not working:

./node_modules/html-react-parser/index.mjs
Can't reexport the named export 'attributesToProps' from non EcmaScript module (only default export is available)

What is the new behavior?

Reverted index.mjs back to how it was before but replaced const with var:

import HTMLReactParser from './index.js';

export default HTMLReactParser;
export var { domToReact, htmlToDOM, attributesToProps } = HTMLReactParser;

@remarkablemark remarkablemark added the bug Something isn't working label Jan 28, 2021
@remarkablemark remarkablemark self-assigned this Jan 28, 2021
@remarkablemark remarkablemark merged commit 167db6f into master Jan 28, 2021
@remarkablemark remarkablemark deleted the fix/es-modules branch January 28, 2021 05:33
@remarkablemark
Copy link
Owner Author

Published v1.2.3:

npm:

Yarn:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
1 participant