what module type are you using? the javascript plu...
# javascript
j
what module type are you using? the javascript plugin has a(n arguably terrible) default of 'plain' instead of something more appropriate like 'umd'
g
I’m using
umd
with a configuration like these one:
Copy code
js {
		attributes.attribute(commonAttribute, "js")

		configure(listOf(compilations["main"], compilations["test"])) {
			tasks.getByName(compileKotlinTaskName) {
				kotlinOptions {
//					languageVersion = "1.3"
					metaInfo = true
//					outputFile = "${project.buildDir.path}/js/${project.name}.js"
					sourceMap = true
					sourceMapEmbedSources = "always"
					moduleKind = "umd"
				}
			}
		}

		configure(listOf(compilations["main"])) {
			tasks.getByName(compileKotlinTaskName) {
				kotlinOptions {
					main = "call"
				}
			}
		}
	}
where I’m using
build.gradle.kts
instead of
build.gradle
u
In my pet projects I'm using commonjs plus webpack and well, it's fine.
g
I was able to solve the problem. I needed to put this configuration both in my common module and in my react module. Without that it wasn’t working. I’ve explained a little more in the thread above