我遵循了快速入门并制作了一个有效的 hello world webpart。
我想包含 twitter 小部件,所以我遵循了关于添加外部 JavaScript 的指南,这是从 git hub 链接的
我将以下内容添加到我的 config.json
"externals": {
"widgets":"https://platform.twitter.com/widgets.js"
},
我用
import 'widgets';
但是,我收到以下错误
***Failed to load component "ab3668f3-39a2-4b40-a307-a1bea4023df9" (TwitterWebPart).
Original error: ***Failed to load URL 'https://platform.twitter.com/widgets.js' for resource 'widgets' in component 'ab3668f3-39a2-4b40-a307-a1bea4023df9' (TwitterWebPart). There was a network problem.
This may be a problem with a HTTPS certificate. Make sure you have the right certificate.
网址https://platform.twitter.com/widgets.js
工作正常。