BearDev
09/07/2020, 1:19 PMUncaught ReferenceError: window is not defined
at universalModuleDefinition:10
at workerLocal.js:15
I understand that window is not a defined object in a web worker context, and my own code avoids using it. But the module loader seems to try to access it. This was not an issue with 1.3.72, and I hope there are some config options I could tweak to get it to work. Hope I can get some help on this as I dont know how to proceed on my on my own.Ilya Goncharov [JB]
09/07/2020, 4:15 PMwindow
context
You can try next WAs, I am not sure, why it was not issue
Create webpack.config.d
folder
Create js file in it
config.globalObject = this
If it does not help, you can try write next thing instead of previous one (https://webpack.js.org/configuration/output/#outputlibrarytarget)
config.output = config.output || {}
config.output.libraryTarget = 'var'
BearDev
09/07/2020, 5:12 PM> Task :jsBrowserProductionWebpack FAILED
Execution failed for task ':jsBrowserProductionWebpack'.
> java.lang.IllegalStateException (no error message)
I am not sure if I could get more information about the exception, that's all that it provided.
Second suggestion seems to have fixed the initial error, but results in another error:
Uncaught ReferenceError: HTMLDivElement is not defined
at Object.n (gen-consumer-tags-js.kt:183)
at Object.<anonymous> (output.js:1)
at r (bootstrap:19)
at Object.<anonymous> (output.js:1)
at r (bootstrap:19)
at bootstrap:83
at output.js:1
at workerLocal.js:11
I think this may be caused by org.jetbrains.kotlinx:kotlinx-html-js
which my projects includes but does not use inside the webworker.BearDev
09/07/2020, 7:09 PMrnentjes
09/08/2020, 9:46 AMbrowser {
webpackTask {
output.libraryTarget = VAR
}
}