Hacker News new | ask | show | jobs
by meanJim 3600 days ago
I got really excited until I realized I couldn't use JavaScript. Over the last year I got super passionate about making the smallest JavaScript bundle size possible with RiotJS or Preact.

I guess they really mean the old school 'website' (like the html 1.0 strict days), so maybe a html document with everything inline and no special fonts.

1 comments

You can use JavaScript, just not JavaScript libraries.
Not true. JS libraries simply count against your 10kB. In the past, they may have been "free resources"
So what does this mean?: "In order to encourage folks to use native JavaScript functionality and keep their project as slim as possible, this year we’ve chosen to remove JavaScript libraries from the “free resource” camp."
You could previously include JS libraries and they didn't count against the 10k limit. now they do. EDIT: Somehow, since lazy-loading not strictly required stuff apparently doesn't? (https://a-k-apart.com/faq#size)
You can lazy load libraries for sure. I would still keep those to a minimum, including only what you need. For instance, don’t load all of jQuery if you only need one feature. And use native JavaScript code when you can get away with it—dataset instead of data(), querySelectorAll() instead of $(), etc.