I’m running a Laravel application witih laravel-mix (v2.1.x of now), but want to upgrade to the latest version of laravel-mix (v4.0.x) with the benefits of faster builds, newer webpack etc.
However, after trying, I have noticed that the
<style> blocks from all components in the entire application is injected on every page.
The application isn’t single page as of yet, so it was quite a surprise to see the number of
<style> tags in
<head> rise from like 4-5 to 86. We also have a NPM repo with custom design components that are also included here.
In vue-loader 14 it seems to only inject the styles needed for that page in particular, and nothing more. In the v14 to v15 migration docs, there is a mention of this, but I am really missing an option to disable this somehow.
Is there a workaround, hidden option or any way to get around this without having to go through every single component and re-write a bunch of CSS?