github varabyte/kobweb v0.12.0

latest releases: v0.24.0, v0.23.3, v0.23.2...
pre-release3 years ago
⚠️ ⚠️ ⚠️ IMPORTANT⚠️ ⚠️ ⚠️
There is a major issue (likely in Kotlin 1.8.0) that's affecting building release artifacts for some Kotlin/JS users. As a result, using v0.12.0 is not recommended at this point. Instead, please stick to the latest v0.11.x release for now.

v0.12.1 will be released as soon as the upstream issue is remedied.

This release is feature-wise the same as 0.11.9, except it targets Compose 1.3.0 and Kotlin 1.8.0.


Note: Kobweb v0.12.0 is making some opinionated decisions around yarn locking. Most people will probably be OK not worrying about it, but you may wish to read on to decide if you want to override Kobweb's default behavior in your own project.

In Kotlin 1.8.0, the Kotlin/JS Gradle plugin is a bit more strict about yarn.lock files, starting to expect users to check kotlin-js-store/yarn.lock into source control as a best practice. By default, normal Kotlin/JS builds now fail if you had an old yarn.lock file that is about to get updated with some new values, requiring explicit user action to continue.

For Kobweb, however, we're currently taking the opinion that failing the build is probably too harsh for most simple, single-owner projects and that most users can get away with regenerating the lock file every time. As a result, the Kobweb plugin configures things to auto-regenerate the lock file by default, rather than failing.

If for your project you want to opt-in to failing the build if the lock file has changed, then I recommend taking the following steps:

  1. In your build script, update your kobweb block:
kobweb {
  yarn.lockChangedStrategy.set(YarnLockChangedStrategy.Fail)
}
  1. Remove kotlin-js-store from your project root's .gitignore file
  2. If kobweb run results in a build error related to your yarn.lock file, quit Kobweb and then run ./gradlew kotlinUpgradeYarnLock. Once finished, run kobweb run again, which should now work without hitting that failure.

For more information, please read the official Kotlin docs discussing this feature and the official Yarn docs talking about yarn.lock files.

Also, you may wish to confer with the header docs in YarnBlock.kt.

Don't miss a new kobweb release

NewReleases is sending notifications on new releases.