-
-
Notifications
You must be signed in to change notification settings - Fork 133
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(esm): make ESM exports explicit in index.mjs and utilities.mjs
Fixes #1228 Vite fails with the error: ``` 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) ```
- Loading branch information
1 parent
8cc2c36
commit 3e0fd2b
Showing
2 changed files
with
17 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,13 @@ | ||
import HTMLReactParser from '../lib/index.js'; | ||
|
||
export * from '../lib/index.js'; | ||
export { | ||
Comment, | ||
Element, | ||
ProcessingInstruction, | ||
Text, | ||
attributesToProps, | ||
domToReact, | ||
htmlToDOM, | ||
} from '../lib/index.js'; | ||
|
||
export default HTMLReactParser.default || HTMLReactParser; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,8 @@ | ||
export * from '../lib/utilities.js'; | ||
export { | ||
isCustomComponent, | ||
setStyleProp, | ||
PRESERVE_CUSTOM_ATTRIBUTES, | ||
ELEMENTS_WITH_NO_TEXT_CHILDREN, | ||
canTextBeChildOfNode, | ||
returnFirstArg, | ||
} from '../lib/utilities.js'; |