remarkablemark/html-react-parser

Issue after 5.0.9 update

pongells opened this issue · 3 comments

Expected Behavior

I should be able to use Element

Actual Behavior

When I run my React app using Vite I get:

Uncaught SyntaxError: The requested module '/@fs/Users/.../node_modules/.vite/app/deps/html-react-parser.js?v=719515aa' does not provide an export named 'Element' (at list.tsx:6:31)

in list.tsx I have:

import { DOMNode, domToReact, Element } from "html-react-parser";

Steps to Reproduce

Try to use Element after 5.0.9 update.

Environment

  • Version: 5.0.9
  • Platform: Vite
  • Browser: Chrome
  • OS: MaxOs

You're right @pongells, I caused a regression in the latest release. I was able to reproduce the issue in https://codesandbox.io/p/devbox/html-react-parser-fg2jpw

I will prioritize a fix ASAP. Related to ce09a65#r135238939

Thanks @remarkablemark , works like a charm :)