How to use SOLARA_ASSETS_EXTRA_LOCATIONS

Hey, I hope that you are doing well. I tried to add a folder containing js assets by exporting the variable: export SOLARA_ASSETS_EXTRA_LOCATIONS="/path/to/js/folder/". My main issue is that when I watch the sources in my app, I cannot see the aforementionned folder within _solara/cdn/ If I downloaded, let's say a library from npm packaged as tgz do you have an idea on how should I proceed to make it available in my app ? That would be awesome as it would enable me to use a JS library of the design system of my company into my solara applications, I'm sure it would have a damn good effect ! FYI, I use starlette server on a very simple script (solara run app.py) with app.py containing basically a hello world. I made sure that the assets recognized the path provided by printing Assets().extra_paths() from solara.server. Kind regards, Tristan
3 Replies
Jovan
Jovan7d ago
I am kind struggling with the same thing, and these are the instructions: https://github.com/widgetti/solara/pull/847/files I hope it will help you
Agnôle
AgnôleOP6d ago
Thanks, by chance I already saw your contribution and I find it truly awesome ! Unfortunately for me, the only way I can consume my company's component library is through downloading it as tgz or using npm install on a private, nexus registry. That's why I'm only concerned by finding how to use the local CDN

Did you find this page helpful?