Closed hamyyy closed 10 months ago
What do you mean specifically by "should import from dompurify directly"? AFAIK something like import DOMPurify from "dompurify";
or import DOMPurify from "../node_modules/dompurify";
is not possible on the client side without an extra build step.
The following lines
https://github.com/jarek-foksa/xel/blob/e93d0aa0bf34a6b601f45383a9ecb8be9a5e742a/classes/xel.js#L8 https://github.com/jarek-foksa/xel/blob/e93d0aa0bf34a6b601f45383a9ecb8be9a5e742a/classes/xel.js#L13
Should really import from
dompurify
and@fluent/bundle
directly.I like your library and trying to use it in a Svelte project. But using the npm package has much to be desired. so instead I'm importing this git repo as an npm module
This works (mostly), but the imports shown above are breaking things.
Importing the unminifyed library also gives me typings in editor and gives me access to very useful functions such as
formatColorString
, which I will need as I'm planning on making a port of the components in this library to Svelte.