tiddly-gittly / Modern.TiddlyDev

Modern TiddlyWiki Developing Environment
https://tiddly-gittly.github.io/Modern.TiddlyDev/
MIT License
57 stars 3 forks source link

Plugin Size Reduction #52

Closed GameDungeon closed 5 months ago

GameDungeon commented 11 months ago

First, I want to say I love this tool and find it extremely useful.

In tiddlywiki reducing plugin size is quite important, and when dealing with large libraries like my tiddly2pdf lib, a plugin can grow in size very quickly. My plugin currently sits at 1.9 MB, and that can be quite the turn-off from general use (It's bigger than some wikis.) I'm wondering if something can be done to reduce the impact large libraries have on plugin size, possible through a process like tree shaking?

Gk0Wk commented 11 months ago

The framework internally uses esbuild to compile the plugin , esbuild has enabled the ES6 Module Tree Shaking , and will generate the plugin js and css to minimize compression . Please check the Modern.TiddlyDev#Minify field.

See doc

GameDungeon commented 11 months ago

That's unfortunate then. I think that's enabled. Maybe the lib I'm using just doesn't minimize well.

linonetwo commented 5 months ago

Esbuild in this is upgraded, have a try on latest version.