Custom.js file not executed

Hi !

I am running jupyterlab in a docker container, here is the docker-compose file :

version:  '3'
services:
  datascience-notebook:
      image: jupyter/datascience-notebook:python-3.10
      container_name: jupyter_notebook
      volumes:
        - /home/user/docker_volumes/jupyterlab/work:/home/jovyan/work
        - /home/user/docker_volumes/jupyterlab/.jupyter/custom:/home/jovyan/.jupyter/custom
      ports:
        - 8888:8888
      command: "start-notebook.sh \
        --ServerApp.token='' \
        --ServerApp.password='' \
        --ServerApp.disable_check_xsrf=True \
        --ServerApp.allow_remote_access=True \
        --ServerApp.port=8888 \
        --ServerApp.open_browser=False \
        --ServerApp.allow_origin='*' \
        --ServerApp.tornado_settings='{\"headers\":{\"Content-Security-Policy\":\"frame-ancestors \'self\' *\"}}'"

In the custom folder is a file custom.js with a simple console.log("custom js file loaded"). For some reason, this file is not executed when jupyter is loaded in my browser (in the browser’s console) both when directly opening jupyter lab’s page and when loaded into an iframe on another page.

I tried reloading the webpage and restarting the container, both didn’t work.

Here is the full path of the file : /home/jovyan/.jupyter/custom/custom.js

Does anyone know where the issue could come from ?