So I'm trying to create a react project using Kotl...
# javascript
f
So I'm trying to create a react project using Kotlin based off the
kotlin-fullstack-sample
but I'm getting the following error from webpack when I try to include the compiled kotlin2js output in my webpack bundle:
Copy code
Module not found: Can't resolve 'kotlinx-html-js' in '/Users/figitaki/Developer/kotlin/demo-kotlin-scripts/src'
I looked on
npm
and there's no package called
kotlin-html-js
any ideas?
b
^^ @cy
f
Small update, I believe a potential solution could be extracting the
.js
files from the
kotlinx-html-js
jar during the gradle task build. I'm trying that now.
Yep, I solved the issue. I just published the [kotinx-html-js](https://www.npmjs.com/package/kotlinx-html-js). I'll document this in a medium post I'm writing soon for a boilerplate I'm working on.
c
frontend plugin does unpack actually, so there is no need to publish it to npm
f
@cy I'm actually working on plugin for the
create-react-app
tool. I think it will make Kotlin /way/ more accessible to the JS community. You can check it out here: https://github.com/figitaki/kotlin-scripts
👍 3
c
This looks really interesting. Have you considered generating a build.gradle.kts file instead of (or in addition to) build.gradle?
f
@Chris Miller Ooh nah, didn't even know that was an option, I'll look into that (if you're interested PR's are also welcome 😁)