How to analyze your JavaScript bundles

Поделиться
HTML-код
  • Опубликовано: 26 янв 2025

Комментарии • 18

  • @linglingqiu475
    @linglingqiu475 4 года назад +21

    To recap:
    1. [Chrome dev tools] Network tab (js filter): find how big JavaScript bundles are downloaded
    2. [Chrome dev tools] Coverage tab (ctrl + shift + P(Windows)/cmd+shift+P(Mac) and type "coverage"): find how much unused JavaScript code when loading the page
    3. [Lib] Webpack-bundle-analyzer: visualize which module makes up the bundle, show size of each module and relations to each other
    4. [Lib]Source -map-explorer: visualize treemap of the bundle and identify the problem (lazy load,duplicated, too large code etc)
    5. Lighthouse: help analyze how much unused code, potential savings and polyfills that new browsers don't need etc, by using source map

    • @MaxCoplan
      @MaxCoplan 4 года назад +1

      Isn't it ironic that Google isn't using RUclips's new timestamp feature?

  • @domaincontroller
    @domaincontroller 4 года назад

    02:29 coverage tab 03:33 webpack-bundle-analyzer, bundle-specific visualization tools 04:40 source maps explorer 06:18 lighthouse, source maps

  • @ajinkyax
    @ajinkyax 3 года назад

    In case anyone wondering how to get NPM Analyze web page.
    @4:06 he meant running "ANALYZE=true npm run build" which builds and opens this in your browser.

  • @Greatfulone
    @Greatfulone 3 года назад

    Thank you so much. Learned more than I ever expected to learn, and the content relevance to what I was after was spot on! Thank you for speaking clearly, and with great volume. Perhaps the best tutorial I've watched on youtube; ever!

  • @navin-moorthy
    @navin-moorthy 4 года назад +7

    Great explanation. Learned a lot. Thanks!!

  • @fireystella
    @fireystella 4 года назад +1

    i love these lil videos, thanks so much hehe

  • @hkjpotato
    @hkjpotato 4 года назад

    whats the diff between vis of bundles and source map?

    • @otololua3645
      @otololua3645 4 года назад

      you can use "webpack-bundle-analyzer" if you are using webpack for your bundles.

  • @santicros
    @santicros 4 года назад +1

    That was really great!! Thanks!!!

  • @alexanderk5399
    @alexanderk5399 4 года назад

    excellent and very practical video!

  • @jwolfe890
    @jwolfe890 3 года назад

    great video. thank you!

  • @cpramshadcp
    @cpramshadcp 3 года назад

    Really useful info. Thanks.

  • @eriboss11
    @eriboss11 4 года назад

    Very useful , thanks :)

  • @chandrashekard.7543
    @chandrashekard.7543 4 года назад

    Great stuff 👍

  • @ekkarat6612
    @ekkarat6612 4 года назад +1

    excellent

  • @bren.r
    @bren.r 4 года назад

    Or just stop relying on all these heavy front end frameworks to begin with.

    • @bLd321
      @bLd321 4 года назад

      Yes! Let's go back to assembler. Sorry Brendan, but these heavy front end frameworks make a team working on app much more productive, less expensive and able to create code much more robust, easier to mantain and less buggy. Of course, choose to best tool for a job. You don't need Angular to write you simple, static website. But writing an application in 20+ team for 2+ year without those frameworks would be total failure on many layers.