Skip to content

fix: export domhandler' Element from it's exports field #565

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Merged

Conversation

AlbertAZ1992
Copy link
Contributor

What is the motivation for this pull request?

Fix error when running with webpack build

bug fix

What is the current behavior?

Got Module Not Found error Package path ./lib/node is not exported from package ..../node_modules/domhandler

I found the related issue #252 (comment) and pr #296 , which exports the Element type of domhandler.

But domhandler has used exports field, only exports index files https://github.com/fb55/domhandler/blob/master/package.json#L13

 "exports": {
        "require": "./lib/index.js",
        "import": "./lib/esm/index.js"
    },

What is the new behavior?

Require Element directly from 'domhandler' index.

Error no longer appears and webpack build runs correctly

Checklist:

@codecov-commenter
Copy link

Codecov Report

Merging #565 (095b6a2) into master (44c078c) will not change coverage.
The diff coverage is 100.00%.

@@            Coverage Diff            @@
##            master      #565   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files            8         8           
  Lines          167       167           
  Branches        57        57           
=========================================
  Hits           167       167           
Impacted Files Coverage Δ
index.js 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 44c078c...095b6a2. Read the comment docs.

@remarkablemark remarkablemark merged commit 97b138d into remarkablemark:master May 27, 2022
@remarkablemark
Copy link
Owner

Released #567 (comment)

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants