If I include some css code with url tags, speeds slow down excessively (3s --> 98s).
For example:
@font-face {
font-family: MyFont;
src: url('/fonts/myfont/font.woff2') format('woff2'), url('/fonts/myfont/font.woff') format('woff');
font-weight: 400;
font-style: normal;
}
I know that a similar problem was found on Mix: https://github.com/JeffreyWay/laravel-mix/issues/232
How can I disable resolving css urls (or solve this problem?)
Thanks
Hi @pensiero,
You can set the resolveUrlLoader option to false when calling enableSassLoader:
Thanks so much @Lyrkan !
I save only 1 second 11.90 => 10.90 with resolveUrlLoader: false and Bootstrap Scss, is it normal please?
@Lyrkan thank you for your answer!
I had this option since the first time I tried Encore and I still see the assets files copied and versionned.
Most helpful comment
Hi @pensiero,
You can set the
resolveUrlLoaderoption tofalsewhen callingenableSassLoader:https://github.com/symfony/webpack-encore/blob/00e4051eb0ef18786a9d6abe2f9f2e73c887e8fa/index.js#L451-L466