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

[unified-server] Stage index.html during build #4365

Merged
merged 1 commit into from
Feb 6, 2025
Merged

Conversation

timswanson-google
Copy link
Member

@timswanson-google timswanson-google commented Feb 5, 2025

This change replaces the hand-coded version of the index.html (which was copied from visual editor) with a version that is copied automatically during staging, as a prerequisite to the build.

Entry points do not change.

The only meaningful difference between the two HTML files was that the unified server version replaced this:

const { Main } = await import("./src/index.ts");

With this:

const { Main } = await import("@breadboard-ai/visual-editor");

However, a direct copy from the visual editor works as long as the Main class can be imported from a source file found at ./src/index.ts. So a file is added to unified-server that re-exports the the visual-editor module.

Fixes #4350

This change replaces the hand-coded version of the `index.html` (which
was copied from visual editor) with a version that is copied
automatically during staging, as a prerequisite to the build.

Entry points do not change.

The only meaningful difference between the two HTML files was that the
unified server version replaced this:

https://github.com/breadboard-ai/breadboard/blob/c3816e4a0dd81894693b174a70050151260e0303/packages/visual-editor/index.html#L42

With this:

https://github.com/breadboard-ai/breadboard/blob/c3816e4a0dd81894693b174a70050151260e0303/packages/unified-server/index.html#L38

However, a direct copy from the visual editor works as long as the
`Main` class can be imported from a source file found at
`./src/index.ts`. So a file is added to unified-server that re-exports
the the visual-editor module.
Copy link

changeset-bot bot commented Feb 5, 2025

⚠️ No Changeset found

Latest commit: 60a3e46

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@paullewis
Copy link
Contributor

LGTM!

@timswanson-google timswanson-google merged commit fefdf58 into main Feb 6, 2025
10 checks passed
@timswanson-google timswanson-google deleted the 4350-index branch February 6, 2025 14:12
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.

[unified-server] Create a common bootstrap page for the visual editor
2 participants