Closed Advicel closed 7 months ago
export 'sanitize' (imported as 'DOMPurify') was not found in 'dompurify' (module has no exports)
package.json:
"dompurify": "^3.0.8",
and import like this into the typescript file
import * as DOMPurify from 'dompurify';
<Text3 dangerouslySetInnerHTML={{ __html: DOMPurify.sanitize(item.text) }} />
[bag] - build error in react app
export 'sanitize' (imported as 'DOMPurify') was not found in 'dompurify' (module has no exports)
Background & Context
package.json:
"dompurify": "^3.0.8",
and import like this into the typescript file
import * as DOMPurify from 'dompurify';
<Text3 dangerouslySetInnerHTML={{ __html: DOMPurify.sanitize(item.text) }} />