Skip to content

[p5.js 2.0] Investigate replacing dependencies #7761

Open
@error-four-o-four

Description

@error-four-o-four

Hey there,

First of all: congratulations and thank you for releasing 2.0

I've been looking through the dependencies in the package.json file and thought that it might be possible to reduce the weight of the node_modules folder and its contents (208 MB). Additionally this could result in a smaller bundle and speed up the build and tests. See the list down below for further insights

Another Issue that caught my eye is the 'exports' field "./": "./src/app.js". The specifier "./" should be changed to "."

dependency replacements

[email protected] (7.85 MB) => chroma.js (396 kB)

file-saver@^1.3.8 (36 kB)

  • depends on Blob.js which is not prebundled
  • additionally all main Browser have built-in support of Blobs

[email protected]

  • 9 years old (?)

[email protected] (38.5 kB)

  • is not bundled / minified
  • 6 years old

dev dependency replacements

[email protected] (670 kB)

  • could be replaced by a single utility function

[email protected] (132 kB) => nano-staged (41.1 kB)

[email protected] (4.49 MB)

  • MSW supports browser and node environments which seems to be a bit of an overkill for its used purpose in the tests

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions