How do i change the distribution path of a wasm co...
# compose-web
a
How do i change the distribution path of a wasm compose app? When i use the
distribution
block, the composeApp.js and many other files are not included in the output
Copy code
wasmJs {
        browser {
            distribution {
                val rootDirPath = project.rootDir.path
                outputDirectory = File("$rootDirPath/dist/${project.name}") // <- 
            }
        }
        binaries.executable()
    }
was missing the webpack config, so it seems that is important. all good now
Copy code
wasmJs {
        browser {
            distribution {
                val rootDirPath = project.rootDir.path
                outputDirectory = File("$rootDirPath/dist/${project.name}")
            }
            val rootDirPath = project.rootDir.path
            val projectDirPath = project.projectDir.path
            commonWebpackConfig {
                outputFileName = "composeApp.js"
                devServer = (devServer ?: KotlinWebpackConfig.DevServer()).apply {
                    static = (static ?: mutableListOf()).apply {
                        // Serve sources to debug inside browser
                        add(rootDirPath)
                        add(projectDirPath)
                    }
                }
            }
        }
        binaries.executable()
    }
👍 1