Skip to content

Upgrade deps; migrate to Vite - #8

Open
jacbn wants to merge 5 commits into
mainfrom
improvement/26-07-deps-update
Open

Upgrade deps; migrate to Vite#8
jacbn wants to merge 5 commits into
mainfrom
improvement/26-07-deps-update

Conversation

@jacbn

@jacbn jacbn commented Jul 24, 2026

Copy link
Copy Markdown
Contributor

No description provided.

@barna-isaac barna-isaac left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've locally checked the demo site (https://code-editor.ada-cs.org/), which works perfectly (used localhost for the new version). However, I don't think we'll be able to test the integration without actually deploying this.

Thanks for the migration to vite! I don't know too much about its advantages compared to webpack, but I think just the consistency with react-app is worth the migration.

Interestingly, there's a disconnect between the overall bundle size and the amount of data downloaded on the demo site. Overall bundle size decreased from ~7 MB to ~4.5MB. However, the size of content actually downloaded by the demo site has increased from 886 KB to almost 2MB. I think webpack broke up the dependencies into smaller chunks? Still, I think 2 MB is fine. A nice improvement is that we no longer host source maps, which we did, eg. https://code-editor.ada-cs.org/435.map.js, although this isn't where the reduction in bundle size is coming from, as I've excluded the source maps from the ~7MB figure.

Although not explicit in the commit, when we rebuild the service for the deploy, the nginx version will update from 1.24.0 to 1.30.4 (or a newer version if that's available). It might also be worth fixing this version in the Dockerfile (something to do later, not a change I'm requesting now).

However, please go through the findings and decide if you'd like to address any of my comments. I think the typescript errors would be worth fixing, and restoring the old docker-compose build behaviour so it breaks on typescript errors would also be worth it.

Comment thread Dockerfile
Comment thread eslint.config.mjs
@@ -0,0 +1,59 @@
import globals from "globals";

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is the eslint config used for? Have you been able to execute it successfully? Is the config just here for VSCode? (doesn't even work there for me...)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, I broke it when upgrading other deps but I've now restored it. I only added it so the setup across this, react-app and in theory the editor all align to make it easier for ourselves when coding across different projects.

Comment thread package.json Outdated
Comment thread vite.config.ts
},
},

mode: process.env.NODE_ENV === 'production' ? 'production' : 'development',

@barna-isaac barna-isaac Jul 27, 2026

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

shouldn't we set "production" either in package.json or docker-compose? I'm not sure what difference this would make though, as we already don't emit source maps

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've only copied this over from the previous config; it seems perfectly fine to leave it here as Vite does accept a mode like this. I suppose we could pass it in via --mode {mode} in package.json if you wanted? Seems not to matter.

jacbn added 3 commits July 31, 2026 16:11
TS7 does not yet have an API release, so `typescript-eslint` (a fairly major part of eslint) won't work with it. TS6 is still new and we can upgrade again at a later date.
@jacbn

jacbn commented Aug 4, 2026

Copy link
Copy Markdown
Contributor Author

I've made the changes! Happy that docker compose build is still running as expected.

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