Open davidnoh opened 3 years ago
I thinks it's under consideration here #429
For defer just add to config/packages/webpack_encore.yaml
webpack_encore:
script_attributes:
defer: true
For preload would be very nice to have a functionality as defer.
Google Lighthouse complains that css of dynamically imported Vue components are placed without rel="preload". Is it possible to extend this via Encore Configuration? The API shows no indications to extend the MiniCssExtractPlugin configuration.
The links placed by Twig via webpack_encore.tag_renderer do have preload set.
When we use WebpackPreload for the components, every script is loaded into the DOM, regardless of whether it is needed or not.
The Vue Components are single file components with style-blocks and lang = "scss" configuration.
If we add .disableCssExtraction() no css Files are generated at all, but we have to build at least some css files with addStyleEntry.