library.js missing when published with useEsModules() gradle option

Summary The library.js file is missing in the npm package when published with the useEsModules() option. This results in an import failure in JavaScript projects. The issue is only occurring when the project is built with the useEsModules() option. The library.d.ts file seems to be generating fine.

Environment Kotlin version: 1.9.0 Plugin version: 3.4.1

Gradle Configuration

js {
        binaries.library()
        moduleName = "js-kotlin"
        browser {
            webpackTask {
                outputFileName = "js-kotlin.js"
                output.library = "jsKotlin"
            }
            commonWebpackConfig {
                cssSupport {
                    enabled.set(true)
                }
            }
        }
        generateTypeScriptDefinitions()
        useEsModules()
    }

Steps to Reproduce Publish the library once with the useEsModules option and once without this option. Attempt to import the library. Observe that the import is not working in the first case while it's working fine in the other.

Expected Behavior The library should be imported successfully regardless of the useEsModules option.

Actual Behavior When the library is published with the useEsModules option, the import fails.