Skip to content

Conversation

@BossSloth
Copy link
Member

Added a watch mode to the transpiler with rollup that automatically rebuilds and changes. This also only rebuilds the changed bundles. So if you for example only change a file in the frontend it only builds the frontend and if you change a file that is used by both the frontend and the webkit (like for example a shared folder) it builds both. It will also trigger a rebuild if any file that was referenced by a constSysfsExpr is changed which then only runs the constSysfsExpr plugin for a quick compile (all handled by rollup).

Watch mode can be activated by just providing it the --watch parameter like so millennium-ttc --build dev --watch

By using rollups built in watch feature it also increases the performance on subsequent runs as rollup can then use it's cache to only rebuild the changed parts.

For example "worst-case" my plugin extendium takes about 3100ms for the frontend and 2000ms for the webkit in total taking 5800ms with a normal dev compile. If I then change something in the frontend it then only takes 1200ms where it just compiles the frontend. If I do the same for the webkit it now only takes 400ms to compile. If I change something in my shared bundle it then only takes 1400ms to compile both down from the original 5800ms on first run.

This makes development a lot quicker as you no longer have to keep waiting for it to build.

If you are wondering why it still takes so long. Most of the time (like 98%) is spent in the typescript plugin becaue the typescript compiler is just slow. It is possible to switch to something like esbuild or swc but then you lose type-checking in the cli which can be quite to have.

@shdwmtr
Copy link
Member

shdwmtr commented Dec 31, 2025

Nice PR! I low-key neglect the transpiler. I plan to massively overhaul it soon.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants