-
-
Notifications
You must be signed in to change notification settings - Fork 251
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
wip: use connect core in suite-web #14959
base: develop
Are you sure you want to change the base?
Conversation
ab19949
to
60d634f
Compare
nice, I can run but: |
60d634f
to
88cd2c9
Compare
Right, if you build
Here 88cd2c9 I made the changes to move |
2f9d8e9
to
cd12463
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I gave it a quick walkthrough and noted couple of questions.
case 'iframe': | ||
return path.join(basePath, 'connect-iframe', 'build'); | ||
case 'suite-web': | ||
return path.join(basePath, 'suite-web', 'build', 'static', 'connect'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
so this is to keep the same connect-related folder structure for web, right? the only change is that iframe is going away but the code that was previously in the iframe is still expecting some statics at the same paths.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, this is for using the same webpack configs for both projects.
So it is built directly from suite-build
instead of copying the build from connect-iframe
as was done before.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this looks nice, core-in-module for web, reusing coreInModule from node only with some overrides 👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am not sure I understand what is going on here. if iframe then load locally? (I didn't check internals of httpRequest
yet. anyway, this is something I will be thinking how to avoid bringing this kind of decision making logic into DataManager. At the first glance it doesn't feel right.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, that feel wrong to me as well, there is other way to do it like 7696f94#diff-54a3dc9015ab9933751016bc35e7987f834b59b24a8d0cc05ef51d1ddabdd1c0 and it works same.
const { initCoreState, initTransport } = await import( | ||
/* webpackIgnore: true */ `${connectSrc}js/core.js` | ||
).catch(_err => { | ||
this._log.error('_err', _err); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what is the reason for dynamic load here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Making it flexible, so in the context of suite-web
connectSrc is going to be different as if we use it somewhere else.
How would you do it?
a7c16d0
to
4cb4b2c
Compare
🚀 Expo preview is ready!
|
4a4efc6
to
2ba4341
Compare
62609c5
to
f437505
Compare
Description
Related Issue
Resolve
Screenshots: