Skip to content

feat: export lib files#989

Merged
remarkablemark merged 1 commit intoremarkablemark:masterfrom
hansottowirtz:export-lib-files
Jul 21, 2023
Merged

feat: export lib files#989
remarkablemark merged 1 commit intoremarkablemark:masterfrom
hansottowirtz:export-lib-files

Conversation

@hansottowirtz
Copy link
Copy Markdown
Contributor

This exposes the lib files, so domToReact can be imported without importing all of domhandler, which reduces bundle size.

It also exposes attributesToProps, which is useful (at least in my project)

You can import like import domToReact from 'html-react-parser/dom-to-react' and import attributesToProps from 'html-react-parser/attributes-to-props'

Checklist:

Copy link
Copy Markdown
Owner

@remarkablemark remarkablemark left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Left a question

@remarkablemark remarkablemark self-assigned this Jul 21, 2023
@remarkablemark remarkablemark added the feature New feature or request label Jul 21, 2023
This exposes the lib files, so `domToReact` can be imported without importing all of `domhandler`,
which reduces bundle size.

It also exposes `attributesToProps`, which is useful (at least in my project)

You can import like `import domToReact from 'html-react-parser/lib/dom-to-react'`
@codecov
Copy link
Copy Markdown

codecov bot commented Jul 21, 2023

Codecov Report

Merging #989 (43a0364) into master (5475f2c) will not change coverage.
The diff coverage is n/a.

@@            Coverage Diff            @@
##            master      #989   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files            8         8           
  Lines          177       177           
  Branches        59        59           
=========================================
  Hits           177       177           

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

Copy link
Copy Markdown
Owner

@remarkablemark remarkablemark left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@remarkablemark remarkablemark merged commit bc1dfd6 into remarkablemark:master Jul 21, 2023
@remarkablemark
Copy link
Copy Markdown
Owner

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feature New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants