Presumably the 40mb of data is not from Wikipedia, but the Javascript tracking code bundle needed to turn it into a doomscrollable social media feed. ;) By those standards, I think it’s pretty lightweight! For comparison, the Instagram iOS app is 468.9mb, more than ten times the size…
40mb is way too much for a JS bundle... Even with a framework you could do this with 5mb or less.
Now imagine how big the builds are for Instagram's server side doomscrollable feed algorithm, given their inverse incentives to this project.
The 40MB of data is Wikipedia data, the site itself is 21kB.