请教module "fetch-wechat.js" is not defined的问题
在app.js的onLaunch里调用插件configPlugin函数
var fetchWechat = require('fetch-wechat');
var tf = require('[@tensorflow](/user/tensorflow)/tfjs-core');
var plugin = requirePlugin('tfjsPlugin');
//app.js
App({
onLaunch: function () {
plugin.configPlugin({
// polyfill fetch function
fetchFunc: fetchWechat.fetchFunc(),
// inject tfjs runtime
tf,
// provide webgl canvas
canvas: wx.createOffscreenCanvas()
});
}
});
插入代码后测试tensorflow插件
结果没有显示出插件安装成功,是这样的