Embedding Next.js Chat Pop-Up into Websites Without iFrame #57611
Unanswered
furiousteabag
asked this question in
Help
Replies: 1 comment
-
@furiousteabag Hey did you figure it out? |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Summary
Hey next.js community,
I've built a chat pop-up using next.js, source code is available in my repo. To deploy, I added an
output: "export"
tonextConfig
and I am serving theout/
folder with nginx. It is running live here: https://chat-popup.askguru.ai/?token=123My goal is to embed this pop-up into other websites. I've tried doing it via
iframe
like this:With this approach, website content becomes uninteractive because
iframe
fills the whole screen. I am not able to predefine the size of aniframe
in advance because the logic of changing the size of a pop-up is tricky and in some cases, the app might fill the whole screen. I don't want to manage the size of aniframe
in the app itself.So I think the only option is to serve the app with the loader script. But in the
out/
folder there is no single.js
bundle that may be served. In a plain react app, for example, I have usednode scripts/build.js
to get a singlebundle.js
as well as.css
.So the question is how to embed my next.js app into other websites? Maybe I could use next.js serving (
next start
) somehow?I am happy to provide any additional information.
Thank you in advance!
Additional information
No response
Example
No response
Beta Was this translation helpful? Give feedback.
All reactions