You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Unfortunately this plugin doesn't "play nice" with css-loader.
Trying to use .webp images from CSS will fail unless the url: false option is set for css-loader. For example, this code:
body {
backgrund-image: url('/assets/cover.webp')
}
will fail since initially only cover.jpg exists, and cover.webp is created dynamically by this Plugin.
Potential fixes:
use url: false option for css-loader (however this might be incompatible if your projects depends on creating the assets via this loader)
have a pre-webpack step which generates the images, not part of the Webpack config. This way, the .webp files exist beforehand.
Option 2 will take some work so please up-vote this issue, this way I know how many people are affected by this problem and can prioritize accordingly.
The text was updated successfully, but these errors were encountered:
Unfortunately this plugin doesn't "play nice" with css-loader.
Trying to use
.webp
images from CSS will fail unless theurl: false
option is set forcss-loader
. For example, this code:will fail since initially only
cover.jpg
exists, andcover.webp
is created dynamically by this Plugin.Potential fixes:
url: false
option forcss-loader
(however this might be incompatible if your projects depends on creating the assets via this loader).webp
files exist beforehand.Option 2 will take some work so please up-vote this issue, this way I know how many people are affected by this problem and can prioritize accordingly.
The text was updated successfully, but these errors were encountered: