Alexey Artemiev
03/31/2021, 5:54 PMval x by css {
backgroundImage = require("src/main/resources/image.png")
}
gives an error
Module 'src/main/resources/image.png' not found
Moving file to main/kotlin/... and changing to relative path from the source file dir gives the same "not found" error. Using JsModule gives the same error too.
The advice require("image.png")
doesn't work either.
Where should resources be placed, and how to reference them by relative path in kotlin/js react app?
Please, help!
Google gives only 2-year (and more) old advices which don't help, because kotlin/js seems to have changed much recently.turansky
03/31/2021, 8:24 PMsrc/main/resources/
in modules
2. You need add loader for png
turansky
03/31/2021, 8:26 PM