Hello there. :wave: I use Compose for Web, but wh...
# compose-web
l
Hello there. 👋 I use Compose for Web, but when I use following dependency on another multiplatform module:
Copy code
implementation(project(":shared:gallery"))
Copy code
kotlin {
    js(IR) {
        browser()
        binaries.executable()
    }
    sourceSets {
        val jsMain by getting {
            dependencies {
                implementation(compose.web.core)
                implementation(compose.runtime)
                implementation(project(":shared:gallery"))
            }
        }
    }
}
then I receive blank screen and error in Web Inspector (Safari). Without dependency is everything ok. I can share more details. Thank you.
o
Hello! Does that module use regular expressions? Perhaps a static field with regexp? The error says there is a syntax error in regexp, so you can try validate your regexp.
e
note that JS RegExp syntax is different than Java, and Kotlin's Regex uses the platform's regex implementation. notably, K/JS compiles regexes with the /u modifier, which enables Unicode support, but makes the syntax stricter.
also some forms of
/(?...)/
are not supported in some JS implementations (which means you can't use them from Kotlin's Regex on K/JS either): https://caniuse.com/js-regexp-lookbehind