Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[internal] Need a mechanism to allow local development of kepler-iframe module without CDN deployment #1104

Closed
alexbfree opened this issue Oct 20, 2022 · 3 comments
Labels
refactoring Rewriting code without changing functionality

Comments

@alexbfree
Copy link
Contributor

In order to progress #1092 and probably #1093 as well, we need a mechanism to allow the loading of the local (and potentially developer-modified) version of the kepler-iframe/index.js file rather than last production-CDN-deployed version.

@valentinoli and I have produced a branch with a partial solution.

https://github.com/hestiaAI/hestialabs-experiences/tree/make-kepler-module-editable-locally-in-dev

However this also hits issues due to the imports within the file.

We think @andreaskundig has already done some work/experimentation in this area so we will await his return and ask for his advice.

@alexbfree
Copy link
Contributor Author

Andreas looked into this and gave the following update:

It could theoretically allow us to develop the nuxt app and the kepler integration at the same time, if it worked. But it's not going to work. In theory, it could. Kepler is made with react, so it's ultimately just javascript, and could be made to work inside vue. That's the first thing I tried with kepler, and I quickly ran into a conflict between react an vue's dependencies. I couldn't solve that, and it seemed like something that would happen again with other libraries every time we change a version. So the workaround was to run it in a separate html page, inside an iframe. The whole reason why kepler-iframe exists is to avoid the nightmare of what was Valentin was trying to make work.
Meanwhile our build time has exploded, and we have a big additional reason to avoid having webpack compiling both vue and react.
There would be a way out to allow developing kepler-iframe and the nuxt app at the same time. It would involve running a third server. Currently we have the nuxt server, plus the bubble server, we would need another server for kepler-iframe. I already don't like the idea of having to run the bubble server when developing experiences, so having a second one just for kepler-iframe sounds like overkill to me.

@alexbfree
Copy link
Contributor Author

Based on this, there is nothing can be done for now and we will have to explore other workarounds (such as temporary deployment of in-development code to a test CDN account).

This approach on https://github.com/hestiaAI/hestialabs-experiences/tree/make-kepler-module-editable-locally-in-dev branch might still be useful for other modules that do not include react dependencies.

@alexbfree
Copy link
Contributor Author

Closing ticket for now as there is nothing that can be done.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
refactoring Rewriting code without changing functionality
Projects
None yet
Development

No branches or pull requests

1 participant