chainlit
chainlit copied to clipboard
Allow imports in custom element
trafficstars
Currently, custom elements are only allowed to import from a list of allowed packages. This appears to exclude local packages, as well: When I tried to move some of the code in my CustomElement.jsx to another fileSomeHelperFunction.jsx, I am getting a "Cannot find ./SomeHelperFunction.jsx" in the app. The file is served at localhost:8000/public/elements/SomeHelperFunction.jsx, though.
It would be nice to be able to allow imports from local packages. Without that, everything but trivially complex custom elements quickly become needlessly large and reusing code across multiple custom elements is not possible.