【发布时间】:2021-05-28 08:18:58
【问题描述】:
我已经为我们的 Kotlin 多平台项目添加了 JS 目标。该项目名为 STT。
js(IR) {
binaries.executable()
browser {
commonWebpackConfig {
cssSupport.enabled = true
}
webpackTask {
output.libraryTarget = "umd"
}
}
}
当我查看构建文件夹或运行 JS 任务 jsRun 时,JS 库看起来是空的。
这里是例如构建文件夹中的stt.js
(function (root, factory) {
if (typeof define === 'function' && define.amd)
define(['exports'], factory);
else if (typeof exports === 'object')
factory(module.exports);
else
root.stt = factory(typeof sttalg === 'undefined' ? {} : stt);
}(this, function (_) {
'use strict';
return _;
}));
本质上是一个空对象
但是,当我使用 BOTH 或 Legacy 时,该文件看起来还可以
js(LEGACY) {
binaries.executable()
browser {
commonWebpackConfig {
cssSupport.enabled = true
}
webpackTask {
output.libraryTarget = "umd"
}
}
}
我错过了什么?
【问题讨论】:
标签: javascript kotlin kotlin-multiplatform