Jump to main content

Nicolas Hoizey

  • articles
  • billets
  • links
  • notes
  • talks
  • archives
  • about

Note from 2 December 2020

  • Nicolas Hoizey
  • 2 December 2020
  • Algolia, JavaScript
  • 12 reactions

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 reactions

4 likes

  1. Tanner Dolby avatar
  2. Greg Ives avatar
  3. Hubert SABLONNIÈRE avatar
  4. Alexandre Thuriot♖ avatar

8 replies

  1. Haroen Viaene avatar Haroen Viaene
    Looks like tree-shaking didn’t apply correctly, no? Are you using all those components?
    • 2 December 2020, 22:46
    • Source
  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.
    • 2 December 2020, 23:38
    • Source
  3. Nicolas Hoizey avatar Nicolas Hoizey
    I wonder if I could use ES modules only, instead of bundling into IIFE?
    • 3 December 2020, 14:17
    • Source
  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 :)
    • 3 December 2020, 14:18
    • Source
  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?
    • 3 December 2020, 14:19
    • Source
  6. Nicolas Hoizey avatar Nicolas Hoizey
    I'm not very good with JS, but I can try to understand where there's too much.
    • 3 December 2020, 14:20
    • Source
  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 :)
    • 3 December 2020, 14:22
    • Source
  8. Nicolas Hoizey avatar Nicolas Hoizey
    ok 👍
    • 3 December 2020, 14:24
    • Source
  • Older: Note from 2 December 2020
  • Newer: Note from 15 December 2020

Related content with similar topics

  1. Note from 23 October 2020

    • Nicolas Hoizey
    • 23 October 2020
    • Algolia, JavaScript, WebPerf
    • 12 reactions

    When you have a search form on every page, with #Algolia's autocomplete, what is the current best way to load the full required JavaScript only when the input gets the focus?

If you want to share an error or suggest an enhancement of this content, please edit the source on GitHub.

© Nicolas Hoizey

Built with Eleventy