Note from 2nd December 2020

I wish I could offer this great UX for less than 537 KB of #Algolia JavaScript libraries… 😥

Details about npm packages embedded in the JavaScript code for archives

12 Webmentions

4 likes

8 replies

  1. Haroen Viaene avatar Haroen Viaene
    Looks like tree-shaking didn’t apply correctly, no? Are you using all those components?
  2. Nicolas Hoizey avatar Nicolas Hoizey
    I think I use all these widgets in the left part.

    I don't know if everything in the top right part (algoliasearch-helper) is required.
  3. Nicolas Hoizey avatar Nicolas Hoizey
    I wonder if I could use ES modules only, instead of bundling into IIFE?
  4. Haroen Viaene avatar Haroen Viaene
    I don’t think that will make a difference. Some parts of the code are simply bigger than they could be. If you want to spend time on it, investigating which parts are bigger than they should be will definitely be accepted :)
  5. Nicolas Hoizey avatar Nicolas Hoizey
    If I use the npm version, and use Rollup to bundle for an ES target, does it take your ES versions?
  6. Nicolas Hoizey avatar Nicolas Hoizey
    I'm not very good with JS, but I can try to understand where there's too much.
  7. Haroen Viaene avatar Haroen Viaene
    it will use the ES versions in any case, unless you specify it should take a different version. The output format doesn't matter :)
  8. Nicolas Hoizey avatar Nicolas Hoizey
    ok 👍