在页面动态的创建script标签引入第三方初始化js资源,代码:
{ type: 'text/javascript', async: true, src: 'https://ebanx-js.ebanx.com/v1.36.0/dist/ebanx.js' }
发现设置async报错
ebanx.js:7091 Uncaught TypeError: Cannot read properties of undefined (reading 'REACT_APP_SC_ATTR')
去掉该配置就成功引入,有大佬清楚什么原因吗?看了源码没看懂