-
Notifications
You must be signed in to change notification settings - Fork 7
chore: move bootstrap code into own script #1092
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
Conversation
a114687
to
c204df0
Compare
@@ -104,6 +104,7 @@ | |||
"merkle-reference": "npm:merkle-reference@^2.0.1", | |||
"multiformats": "npm:multiformats@^13.3.2", | |||
"react": "npm:react@^18.3.1", | |||
"react-dom": "npm:react-dom@^18.3.1", |
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 is unfortunate addition here but without it deno compile
seems to try and analyze bootstrap.js
and complain about react-dom/client
being imported. I was unable to find any other way to go around this
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.
Does using an HTTP URL for this in bootstrap.js work?
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.
It does but then we have two places where things are configured and can get out of sync, one will be here and other one will be at
labs/charm/src/iframe/static.ts
Lines 6 to 7 in d3f98bf
"react-dom": "https://esm.sh/react-dom@18.3.0", | |
"react-dom/client": "https://esm.sh/react-dom@18.3.0/client", |
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 actually think we probably should bundle this modules instead of loading them from esm.sh
but perhaps that is a task for another day
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.
They should resolve to the same module cache but who knows
@@ -104,6 +104,7 @@ | |||
"merkle-reference": "npm:merkle-reference@^2.0.1", | |||
"multiformats": "npm:multiformats@^13.3.2", | |||
"react": "npm:react@^18.3.1", | |||
"react-dom": "npm:react-dom@^18.3.1", |
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 isn't ideal, will mean this may be included in the compiled artifact, but I understand why its here
Refactors sandbox bootstrap code into a separate js file so it's easier to iterate