Hello team, I was working with open source jupyter labextensions(eg: spellchecker) and if we run yarn build in the project folder. It is internally calling jupyter labextension build . command. I know that this command is creating a subfolder with the name labextension folder inside the python package sub_folder(eg: jupyterlab_spellchecker) which consists of static compiled JS files but don’t know exactly which lines of code are getting executing internally when we run jupyter labextension build . command. I know it is bundling the typescript/javascript files via webpack but not sure about the lines of code which are getting executing. Can you please help me with this? The main reason of asking this, I want to perform the same thing that is creating static files under the labextension folder, by customising some of the things in it.
Best,
Raghav Mittal
Hi, could anyone please respond?
I know it is bundling the typescript/javascript files via webpack but not sure about the lines of code which are getting executing. Can you please help me with this? The main reason of asking this, I want to perform the same thing that is creating static files under the labextension folder, by customising some of the things in it.
If you are asking about jupyterlab side of things, exploring the source of the builder
package may be a good starting point: jupyterlab/builder/src/build-labextension.ts at f7e5022946d0b8437f076484ef717e9e66cadc8c · jupyterlab/jupyterlab · GitHub
But if you are more generally interested in what webpack is doing under the hood, it is probably not the best place to ask.
As for things that you can customize, these are documented here: Develop Extensions — JupyterLab 4.1.6 documentation
if you don’t see the thing you want to change, I would suggest to be specific and open a very specific issue, with motivation and proposed solution, in the JupyterLab repository 
2 Likes
Okay thanks for your reply. Let me be more specific, due to some current infra limitation, we don’t have the virtual environment and jupyterlab installed in it, that’s why we are not able to run the command jupyter labextension build . command on our remote machine. As the above command is internally executing the webpack config only, is it possible to run the webpack config independently of installing virtual environment and jupyterlab. If possible and feasible can you share that kind of webpack config?
Best,
Raghav Mittal
Maybe this project (which is not yet functional as of today, but work in progress) could help you once ready: GitHub - jupyterlab/jupyterlab-builder: Build tools for JupyterLab (and remixes)
But overall I do not understand why you want to rebuild existing open source extensions since these include the built artifacts in released files.