Hello, I am trying to start a new project using e...
# javascript
t
Hello, I am trying to start a new project using experimental frontend plugin provided by Kotlin 1.3.50 I am able to write code without any errors, and having code completion. When I am running the code, I am getting this kind of error:
Copy code
ERROR in ./kotlin/sample1.js
Module not found: Error: Can't resolve 'kotlin-react' in '/Users/user/IdeaProjects/project/build/js/packages/project/kotlin'
 @ ./kotlin/project.js 3:4-97
 @ multi ./kotlin/project.js source-map-support/browser-source-map-support.js
I guess this not integrated in my bundle. How can I do so?
b
Can you post your gradlefile for inspection?
t
Thanks for getting back at me. Is it this one you are talking about?
b
No, i mean build.gradle
Nvm, just realised its there
😊 1
I'd recommend importing kotlin wrappers from jcenter rather than npm. Also it looks like you need to copy processed resources into js min directory
t
@Big Chungus thank you very much, it works fine now with the following.
b
Glad to assist
b
@Tristan Caron have you managed to install some node dependencies?
Also, is there any official tutorial/API documentation about Kotlin/js? (I guess it would be the one on kotlinlang website but it's rather scarce)
Or examples
Anything would be useful
b
Nope, they're still working on it
b
@Big Chungus didn't see on mobile slack that he indeed managed to install npm deps, nvm then, that's enough
😄 1
t
@Big Chungus do you know how I can reduce the code size? For a simple hello world application, it’s a file of 16mb, and using 40mb of memory. I saw a todo-app made with kotlin + react using 6mb of memory. Using create react app though
b
You need to configure minification and use kotlin-dce plugin
However i haven't managed to achieve that with new plugin, only with kotlin frontend