josdejong / svelte-jsoneditor

A web-based tool to view, edit, format, repair, query, transform, and validate JSON
https://jsoneditoronline.org
Other
814 stars 108 forks source link

Big bundled size #413

Closed NormandoHall closed 3 months ago

NormandoHall commented 3 months ago

Hi! Thanks for this excelente editor.

I am including in a sveltekit project and runs like a charm, but I'm concerned about the bundled size, 500Kb for server and 1Mb for client.

image

image

I am missing something?

sveltekit v.2.5.3 svelte v4.2.12 svelte-jsoneditor v0.22.0

josdejong commented 3 months ago

That is indeed the size of the editor. You can also check out the size of the standalone.js file in the vanilla package: https://unpkg.com/browse/vanilla-jsoneditor/, currently 1.3 MB, or 381KB when gzipped. When comparing this with the index.js file in this package (580 KB, or 150 KB when gzipped), you can get an idea of the size of dependencies like codemirror, ajv, jsonrepair, etc in that. The index.js file does not bundle the external npm dependencies, the standalone.js file does.

NormandoHall commented 3 months ago

@josdejong thanks for the explanation.

regards