Most of what lands here is scratch output that git and npm both ignore. The dev server and the image tests read their bundles from here.
There are exceptions for the files listed below. These files are used in the build process, but need to be generated prior to that.
plotcss.js: The stylesheet compiled fromsrc/css/style.scss. Required bysrc/core.js.maplibre_worker.js: The maplibre-gl web worker, bundled into one standalone script and exported as a string.src/plots/map/map.jsrequires it and turns the string into a blob URL.
These files are committed and shipped in the npm package. Anyone who installs plotly.js and bundles it from lib/ or src/ resolves all of these, so leaving any out of the package breaks that build. These are specifically allowlisted in .gitignore and .npmignore for that reason.
npm run preprocess regenerates these files. Run that command and commit the result whenever the input changes.
- For
maplibre_worker.jsthis means every time the version ofmaplibre-glis updated inpackage.json. The worker file must match themaplibre-glversion used by plotly.js. The commandnpm run maplibre-worker-diff-checkruns in CI to verify that the two are in sync. - For
plotcss.jsthis means every time a stylesheet undersrc/css/changes, including the partials thatstyle.scsspulls in with@use. The same command also writesdist/plotly.css, which strict-CSP applications load instead of the inlined styles.