timwis / jkan

A lightweight, backend-free open data portal, powered by Jekyll
https://jkan.io
MIT License
218 stars 310 forks source link

Define browser support, and add legacy browser build #250

Closed timwis closed 1 year ago

timwis commented 1 year ago

This pull request does a few things:

I've included IE11 support by default because a lot of government organisations still have IE11 installed as the default browser, unfortunately, and government makes up a sizable portion of this product's user base. Fortunately, thanks to differential builds, modern browsers won't need to consume the IE11 build, so there's no real cost to doing so.

I've tested this in IE11 on browserstack and it seems to be working fine (whereas v2 didn't, otherwise).

Note that the modern build increased in size a bit (like 20 kb) when I added core-js, and I'm not sure why. I presume it's because some of the browser in defaults require polyfills, but I can't imagine what those would be 🤔

EDIT: Oh, and the process module was added by core-js (don't you just love when a dependency adds another top level dependency to your package.json on its own?...) - looks like it's a polyfill for node's process module, is all.

Closes #246