Mar 18, 2019
0
Level 23
Webpack.mix First Render (Critical Rendering Path) Config
Anyone have a best practice or ideally an example for compiling for first paint (Critical Rendering Path) i.e. I would like to compile the core JS and Sass. So that I can minimize initial JS and CSS file size and load. Then defer / async block load the majority of JavaScript and CSS. The purpose is obviously for PageSpeed.
I could just use Webpack vanilla, but wondering if there is a Laravel best practice example.
As a plus if anyone has examples of defer loading third-party scripts like Google Analytics, Facebook API, Twitter, etc. I could write a wrapper, but that almost always goes sideways when an update occurs.
Please or to participate in this conversation.