plotly.js icon indicating copy to clipboard operation
plotly.js copied to clipboard

[MAINTENANCE]: Clean up `.npmignore` file

Open emilykl opened this issue 2 months ago • 4 comments

The Plotly.js tarball published to NPM includes lots of development files that it probably shouldn't, which creates a huge bundle size.

We also had an issue recently where a large folder was included in a bundle by mistake.

We should update .npmignore such that only the required files are included in the bundle.

emilykl avatar Oct 20 '25 18:10 emilykl

Let's include the following in the .npmignore file:

.vscode
.tool-versions
.claude
.github
.circleci

camdecoster avatar Oct 30 '25 19:10 camdecoster

It's worth noting that .gitignore is ignored if .npmignore is present.

camdecoster avatar Oct 30 '25 19:10 camdecoster

We should consider ignoring the schema in the dist folder, or just stop generating it during build.

camdecoster avatar Nov 24 '25 20:11 camdecoster

@camdecoster We should still generate it during build as it's committed to the repo and used by Plotly.py, but I agree we can probably remove it from the NPM bundle.

Looking at the contents of the latest release on NPM, here are some more directories to remove:

  • build/
  • tasks/
  • topojson/ (there is another copy in the dist/ folder)

emilykl avatar Nov 24 '25 20:11 emilykl