jarek-foksa/xel

please fix relative import paths

hamyyy opened this issue · 1 comments

The following lines

import DOMPurify from "../node_modules/dompurify/dist/purify.es.js";

import {FluentBundle, FluentResource, FluentNumber, FluentNone} from "../node_modules/@fluent/bundle/esm/index.js";

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.

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.