timm
02/11/2018, 10:42 AManton.bannykh
02/12/2018, 9:58 AMFilipp Riabchun
02/12/2018, 3:36 PMrequire
them in your main
functionanton.bannykh
02/12/2018, 3:40 PMkotlinFrontend {
npm {
dependency "style-loader" // production dependency
devDependency "karma" // development dependency
}
}
anton.bannykh
02/12/2018, 3:40 PMFilipp Riabchun
02/12/2018, 3:41 PMFilipp Riabchun
02/12/2018, 3:41 PMFilipp Riabchun
02/12/2018, 3:41 PManton.bannykh
02/12/2018, 3:45 PMFilipp Riabchun
02/12/2018, 3:47 PMnode_modules
directory. Requiring it from your code means that it's added in bundleanton.bannykh
02/12/2018, 3:48 PMFilipp Riabchun
02/12/2018, 3:49 PMFilipp Riabchun
02/12/2018, 3:49 PMrequire
themFilipp Riabchun
02/12/2018, 3:51 PM@JsModule
, and the latter via js("require(...)")
anton.bannykh
02/12/2018, 3:53 PMtimm
02/12/2018, 5:49 PMwindow
on load.
So i added an index.js
in src/main/web
require('pixi');
require('p2');
require('phaser');
require('../../../build/kotlin-js-min/main/browser-game-js');
And then added the following customization to the webpack task:
config.entry.main = path.join(__dirname, '../src/main/web/index.js');
This seems to work for now (in combination with expose-loader
). Feels like I have lost sourcemaps when clicking on stacktraces though, will have to check that more.timm
02/12/2018, 5:50 PMtimm
02/12/2018, 7:56 PM