Hello,
would it possible to include some custom js code in the webworker created by panel convert --to pyodide-worker?
I tried to include it through pn.extension(js_files=js_file) but, from the browser console, I see that the code is running in the main thread and not in the worker. Same problem when I tried to include the js code as part of a JSComponent.
Just to give some context (maybe there is a easier way to achieve what I am trying to do): I want to mount a file opened through an HTML file input field in the Pyodide WORKERFS filesystem. That gives me the possibility of reading large files without loading them in memory or making a copy while running the panel app in WASM. In order to do that I have to access the pyodide.FS object which is defined in the worker.
I know that this approach is working if I just paste the js code into the script generated by panel convert, but I was wondering if there is any better/more automatic approach.