What is a proper way to include KotlinJS’s lib fro...
# javascript
v
What is a proper way to include KotlinJS’s lib from VueJS project. I’ve setup KotlinJS compiler to output CommonJS module. Add kotlin with npm --save and do the import. But have the following error:
Copy code
Uncaught TypeError: Cannot read property 'org' of undefined
    at eval (SharedCode.js?ae59:2368)
    at Module.eval (SharedCode.js?ae59:2859)
    at eval (SharedCode.js:3319)
    at Module../src/SharedCode.js (app.js:13570)
    at __webpack_require__ (app.js:767)
    at fn (app.js:130)
    at eval (main.js:18)
    at Module../src/main.js (app.js:14770)
    at __webpack_require__ (app.js:767)
    at fn (app.js:130)
Is there any example to put some KotlinJS code into VueJS project?
a
I don't know any Kotlin/JS + Vue examples. From the looks of it though you might be having trouble with the webpack configuration.
It might be worth taking a look at the webpack configuration generated by the gradle plugin (https://kotlinlang.slack.com/archives/C0B8L3U69/p1560962754111000)
I don't think the webpack configuration for vue is much difference.
If that doesn't work though, feel free to ping me.