Point stability, dependency updates & code quality

Hello everyone!

I spent all of Thursday and Friday doing stability, updates, cleaning, and big news: I managed to upgrade to preact-cli 3.xx!!! :smiley:

It’s just crazy, it changes everything:

  • No more weird bugs when developing (components that duplicate)
  • The JS bundle is built for modern browsers and intelligently loads polyfills. This makes a real difference in bundle size. We remain compatible with > 99% of browsers in circulation, don’t panic :slight_smile: My target for Gladys in general is to be compatible with Firefox, Chrome, and Safari. That’s already good for the project we have.
  • Ability to load components asynchronously and thus not have a huge central bundle, but smaller bundles. We’ll see if we really want to separate the bundle by page. I did some tests to see what it would be like if all routes had separate bundles, and the user experience isn’t necessarily better: instead of having an initial load that’s a bit slower, the app seems slower when you navigate it because you have to make a request per route, and that results in hundreds of bundles instead of one. As the app is a PWA, it means the app has to update by making hundreds of sequential requests, which is slower, whereas when it’s a single bundle, it’s just one request (admittedly a bit slower, but only one request). I think we need to be smart: do this when necessary, on routes that really have very heavy components (example: the map with leaflet, that kind of thing)

I’m super happy with the result, the PR is here for those interested:

https://github.com/GladysAssistant/Gladys/pull/1242

Edit: I made a dev build if you want to test.

The Gladys demo site has also been updated to this new build