jarek-foksa / xel

Xel - Widget toolkit for building native-like Electron and Web apps
https://xel-toolkit.org
Other
677 stars 58 forks source link

please fix relative import paths #124

Closed hamyyy closed 10 months ago

hamyyy commented 1 year ago

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

npm install https://github.com/jarek-foksa/xel

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.

jarek-foksa commented 1 year 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.