JetBrains / compose-multiplatform

Compose Multiplatform, a modern UI framework for Kotlin that makes building performant and beautiful user interfaces easy and enjoyable.
https://jetbrains.com/lp/compose-multiplatform
Apache License 2.0
16.01k stars 1.17k forks source link

[Compose resources]: Make url paths absolute for JS/Web #4765

Closed rustamsmax closed 2 months ago

rustamsmax commented 5 months ago

Please, make url paths absolute for JS!

NOT: composeResources/package.name/values/strings.commonMain.cvr BUT: /composeResources/package.name/values/strings.commonMain.cvr

When window url is dynamically changed via window.history.pushState(data, url, title)

https://domain.com -> https://domain.com/user/dashboard

resources cannot be found giving 404 error

rustamsmax commented 4 months ago

Here's a temporary workaround

telegram-cloud-photo-size-2-5341559966458306041-y

terrakok commented 2 months ago

To achieve it there is an API:

image
terrakok commented 2 months ago

The current default was selected to support different compose apps on the same host and the API is exactly to configure that behaviour

okushnikov commented 2 months ago

Please check the following ticket on YouTrack for follow-ups to this issue. GitHub issues will be closed in the coming weeks.