Closed BKMbigo closed 11 months ago
Use expect/actuals to implement a custom implementation on JS and WASM target. The workaround should be removed when SVG parsing is implemented on Web Platforms.
Since multiple dev versions of Compose-Multiplatform have been released, you can download a dev version of the library compose.components.resources and use it in your project. However, WASM support is still not yet added to the current dev versions making this workaround unapplicable to this project
The workaround would involve adding the following to the Project-Level Build.gradle.kts where 1.5.0-dev1074 is a newer dev version
allprojects {
configurations.all {
val conf = this
conf.resolutionStrategy.eachDependency {
if(requested.module.group.contains("compose.components.resources.js")) {
useVersion("1.5.0-dev1074")
}
}
}
}
Issue (Pertains to the library compose-components-resources)
Vector drawables are not supported on web platforms (JS/WASM) as of Compose-Multiplatform 1.4.0-dev-wasm-08
compose-multiplatform-resources fixed the issue on JS platform only.