質問

is it possible to convert via wro4j maven plugin imported into css image to uridata in build time? I see on their wiki run-time solution but I would like to have static files already converted. Or maybe somebody knows another plugin which can do this?

役に立ちましたか?

解決

There is virtually no difference between run-time solution and build time solution in wro4j. The CssDataUriPreProcessor is responsible for converting image url's into css data uri. In order to use it with maven plugin, just add this processor to the list of processors to be applied. Example:

preProcessors=cssImport,cssDataUri,jsMin,cssMin

Notice the "cssDataUri" alais in the list of configured pre processors. Once added, it should be applied for each pre processed resource.

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top