Find answers, ask questions, and connect with our
community around the world.

Activity Forums Web Design GatsbyJS & CSS ; is it normal that ALL the CSS gets loaded ?

  • GatsbyJS & CSS ; is it normal that ALL the CSS gets loaded ?

    updated 2 months ago 0 Member · 1 Post
  • Maverick

    Member
    September 13, 2019 at 9:48 am

    Hi ! I’ve just noticed something really weird with my Gatsby site. In the , there are no less than 105 imports ; that roughly equates the number of CSS files I have, total, in my /src/styles folder, which seems to demonstrate that all of my CSS (about 1.2MB) gets loaded on every single page. That obvious seems wrong to me, but I’m thinking maybe that’s the way Gatsby does things ? I can’t find a setting that would control that, and I verified all my @imports everywhere in my CSS and SCSS files, I can’t find one point where all the files would be imported somehow. I thought the point of Gatsby was to import only the files that it needed for each page/component and omit the rest. Was I wrong in my assumption ? Thanks for your help, this is very confusing. – by hq overview lekevoid – –

Reply to: Maverick
Your information:

Cancel
Original Post
0 of 0 posts June 2018
Now