fullpipe / twig-webpack-extension

Inject your webpack entry points into twig templates with easy.
MIT License
51 stars 14 forks source link

webpack_entry_css inline #17

Closed gitrequests closed 3 years ago

gitrequests commented 4 years ago

Can we generate inline_css instead of link tag? This is useful in twig blocks were link tags inside body tag is not a good practice. See the Specification.

There is good Extention in TWIG twigphp/cssinliner-extra but it does not work with your Extension.

fullpipe commented 4 years ago

Hello. That will be easy to do. https://github.com/fullpipe/twig-webpack-extension/blob/709079bf8a757955f7d2c3614c986eda93797cd1/src/Fullpipe/TwigWebpackExtension/TokenParser/EntryTokenParserCss.php#L55

We just need to pass file_get_content instead of $tag.