Rohan Maity
09/26/2021, 11:20 AMandroid, iOS and Web
For the web app somehow my generated JS file is getting blocked
The resource was blocked due to MIME type ("text/html") mismatch (X-Content-Type-Options: nosniff).
I have just done the simple Hello world
only,
Its working on android and iOS
has anyone encountered the same issue ?
Any help here would be appreciated
More info in replieswebApp
fun main() {
document.bgColor = "red"
console.log(Greeting().greeting())
}
Greeting()
is the class present in commonMain
in sharedModuleCLOVIS
09/26/2021, 12:03 PM.js
but the error complains that it's HTML. What is your config?Rohan Maity
09/26/2021, 12:09 PMwebpack.config.js
Generated JS
file and filename set in webpack.config.js
was different, so thats why it caused the issue
Later I found out I could change the output file name for webpack.config.js
in dsl
so after changing the to proper name in dsl it was working
More info can found here: https://kotlinlang.slack.com/archives/C0B8L3U69/p1632656555392900CLOVIS
09/26/2021, 12:42 PMRohan Maity
09/26/2021, 12:43 PM