Skip to content

Conversation

@Gozala
Copy link
Contributor

@Gozala Gozala commented Apr 23, 2025

Refactors sandbox bootstrap code into a separate js file so it's easier to iterate

"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",
Copy link
Contributor Author

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

Copy link
Collaborator

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?

Copy link
Contributor Author

@Gozala Gozala Apr 23, 2025

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

"react-dom": "https://esm.sh/react-dom@18.3.0",
"react-dom/client": "https://esm.sh/react-dom@18.3.0/client",

Copy link
Contributor Author

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

Copy link
Collaborator

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

"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",
Copy link
Collaborator

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

@Gozala Gozala merged commit decada4 into main Apr 23, 2025
5 checks passed
@Gozala Gozala deleted the chore/extract-bootstrap branch April 23, 2025 18:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants