报错内容:
tsconfig.json配置:
{
/* Base configuration. Do not edit this field. */
"extends": "./temp/tsconfig.cocos.json",
/* Add your custom configuration here. */
"compilerOptions": {
"strict": false,
"allowSyntheticDefaultImports": true
}
}
package.json配置:
{
"name": "dtexas_cocos",
"uuid": "ae46223d-3ec4-4685-9885-867d3c022f9a",
"creator": {
"version": "3.8.3",
"registry": {
"remote": {}
},
"dependencies": {
"localization-editor": "1.0.3"
}
},
"version": "1.0.0",
"keywords": [],
"author": "",
"license": "ISC",
"description": "",
"dependencies": {
"@dfinity/agent": "^2.0.0"
}
}
导入代码:
import { HttpAgent } from '@dfinity/agent';
console.log(HttpAgent);
什么原因导致cocos creator框架内部的cjs-loader拿不到require函数呢? 还是说我需要额外引什么库?
