Dmitry Kandalov
12/23/2017, 4:56 PMdefine(['exports', 'kotlin', ....
.
However, to load it in npm I need to require 'amdefine' first, as described here http://requirejs.org/docs/node.html#nodeModules there should be a line like this at the top of the generated file if (typeof define !== 'function') { var define = require('amdefine')(module); }
Is there any way to do it in kotlinjs?filiplamparski
12/23/2017, 8:40 PMcommonjs
bashor
12/25/2017, 8:45 PMumd
would be better.bashor
12/25/2017, 8:46 PMcommonjs
for nodejs like environments and amd
and plain
for browser like environmentsDmitry Kandalov
12/26/2017, 5:06 PMumd
seems to be the only way to make kotlinjs work in both node and browserDmitry Kandalov
12/26/2017, 5:09 PMDmitry Kandalov
12/26/2017, 6:23 PMgradle.build
in case anyone is interested https://github.com/dkandalov/lsystem-js/blob/master/build.gradle