Welcome toVigges Developer Community-Open, Learning,Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
3.9k views
in Technique[技术] by (71.8m points)

javascript - Suggestion on injecting a React App Widget on a host website using iframe

I'm making a chat widget, which will be embeddable to any website using an iframe. Previously I made a react app and then bundled everything to ONE bundle.js file and hosted it on S3(or any static file hosting platform) with public access and then inject that file inside the website with iframe (using the script tag). That bundle.js file has a size of nearly 1.23 MBs. I suspect that it can affect the speed of the website loading.

I have tried one more thing, I created the same react app and deployed it on AWS Amplify, and then use the link of that app in the iframe instead of hosting a static bundle.js file. Is the latter one a good approach or the former (bundle.js) was better?


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)
等待大神解答

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to Vigges Developer Community for programmer and developer-Open, Learning and Share
...