Open yuvipanda opened 3 years ago
setup.py
is making sure a npm dependencies are installed, but the only dependencies we have are devDependencies
rather than things shipping with the build.
npm run <script name>
npm install
and npm run webpack
before the setup function is callednpm ci
to install the packages as listed in a frozen package-lock.json file etc, but its not relevant for us at least without any actual dependencies I think.Yeah, I think the goal is to make sure some minification happens, so we don't load close to half a megabyte of JS on page load. We should also make sure our pypi package doesn't contain the .map file either.
Googing around, this seem relevant:
https://webpack.js.org/guides/production/ https://webpack.js.org/configuration/optimization/#optimizationminimize
When we ship the JS built by webpack, we should ship a 'production' version that's optimized for size, etc. Otherwise the bundle sizes seem pretty big:
Originally posted by @yuvipanda in https://github.com/jupyterhub/nbgitpuller/issues/197#issuecomment-902820238