Exclude Skiko files from JS DOM distribution via Gradle-native jsProcessResources exclude#120
Open
Copilot wants to merge 5 commits into
Open
Exclude Skiko files from JS DOM distribution via Gradle-native jsProcessResources exclude#120Copilot wants to merge 5 commits into
Copilot wants to merge 5 commits into
Conversation
…ose.web.targets Configure compose.web.targets() to only include the wasmJs target. The JS target uses DOM-based Compose HTML and does not need Skiko. Previously, the Compose Gradle Plugin's default behavior included all KotlinJsIrTarget targets, causing Skiko files (skiko.mjs, skiko.wasm, skikod8.mjs) to be unnecessarily bundled into the JS DOM distribution. Co-authored-by: ShreckYe <27768951+ShreckYe@users.noreply.github.com> Agent-Logs-Url: https://github.com/huanshankeji/compose-multiplatform-html-unified/sessions/27cf4d8b-4b13-4208-9a34-c3630da9a474
Copilot
AI
changed the title
[WIP] Fix skiko files present in JS DOM distribution
Exclude Skiko files from JS DOM distribution via compose.web.targets
Mar 22, 2026
ShreckYe
approved these changes
Mar 22, 2026
Member
ShreckYe
left a comment
There was a problem hiding this comment.
Confirmed works, but this way is deprecated.
ShreckYe
requested changes
Mar 22, 2026
Member
ShreckYe
left a comment
There was a problem hiding this comment.
- See I've moved it to the demo project because it's only needed inthe app project as I tested.
- You fix uses deprecated APIs. Try to migrate to the latest APIs. Try to find Kotlin's official docs and blogs on this deprecation to fix this problem, and also show me what you found.
- Update README.md asking users to configure this instead since it's only needed in the app project.
…Resources exclude Both compose.web.targets() and compose.platformTypes are deprecated in a circular chain that leads to the Kotlin Compose Compiler Plugin, which only handles compiler configuration, not Skiko runtime bundling. There is no non-deprecated API for this in Compose Multiplatform 1.10.x. Use a Gradle-native workaround to exclude Skiko files from jsProcessResources instead. Also add README section documenting the workaround for library users. Co-authored-by: ShreckYe <27768951+ShreckYe@users.noreply.github.com> Agent-Logs-Url: https://github.com/huanshankeji/compose-multiplatform-html-unified/sessions/3a68a00f-aeeb-407a-8fe0-6be551c105a9
Contributor
Author
Addressed all three points in 54a5c65:
|
Co-authored-by: ShreckYe <27768951+ShreckYe@users.noreply.github.com> Agent-Logs-Url: https://github.com/huanshankeji/compose-multiplatform-html-unified/sessions/3a68a00f-aeeb-407a-8fe0-6be551c105a9
|
Copilot
AI
changed the title
Exclude Skiko files from JS DOM distribution via compose.web.targets
Exclude Skiko files from JS DOM distribution via Gradle-native jsProcessResources exclude
Mar 22, 2026
Member
|
This doesn't work (commit 0b39cce): |
Member
|
Deferred to after checking this in our internal projects. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



The JS DOM distribution (
jsBrowserDistribution) contains unnecessary Skiko files (skiko.mjs,skiko.wasm,skikod8.mjs). The JS target uses DOM-based Compose HTML and has no use for Skiko.Root cause: The Compose Gradle Plugin's
configureWebApplication()defaults to configuring Skiko for allKotlinJsIrTargettargets. ForwasmJs(wherewasmTargetType != null), Skiko is bundled by webpack internally. Forjs(wherewasmTargetType == null), Skiko files are copied directly intojsProcessResourcesand end up in the final distribution.Fix: Exclude Skiko files from
jsProcessResourcesin the demo app project'sbuild.gradle.ktsusing a Gradle-native approach:Why not
compose.web.targets()orcompose.platformTypes? Both APIs in the Compose Gradle Plugin are deprecated in a circular chain:targets()suggestsplatformTypes, which suggests the Kotlin Compose Compiler Plugin (org.jetbrains.kotlin.plugin.compose). However, the compiler plugin only handles compiler configuration, not Skiko runtime bundling. There is no non-deprecated API for this in Compose Multiplatform 1.10.x. Verified in the plugin source: WebExtension.kt and ComposeExtension.kt.Note: This configuration is only needed in the app project (not in library modules). A new section has been added to README.md documenting this workaround for library users.
Original prompt
🔒 GitHub Advanced Security automatically protects Copilot coding agent pull requests. You can protect all pull requests by enabling Advanced Security for your repositories. Learn more about Advanced Security.