Skip to content

Webpack workaround no longer working from 1.4.6 #1071

Closed
@robmaas

Description

@robmaas

The workaround for Webpack warnings described in the REAMDE.md no longer seems to be working for projects using html-react-parser version 1.4.6 and later.
(described in #213 )

We use the workaround in our webpack.config:

module.exports = {
  ...
  resolve: {
    ..
    mainFields: ['main', 'module'],
  }
}

When upgrading the html-react-parser package from 1.4.5 to 1.4.6 the same error comes up again:

export 'default' (imported as 'parse') was not found in 'html-react-parser' (module has no exports)

I guess it is caused by the index.mjs export change in 03bb4d9

This issue persist up to the latest version 4.2.2.

Expected Behavior

Build completes succesfully.

Actual Behavior

Webpack builds fails with an error.

Steps to Reproduce

Reproducible Demo

Our project is very complex, it is not very easy to create a repro. If that is necessary I'll see what I can do.

Environment

  • Version: 1.4.6
  • Platform: Node18, webpack 5.88.2
  • Browser: -
  • OS: Mac/Windows

Keywords

Metadata

Metadata

Labels

wontfixThis will not be worked on

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions