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

Use comments for embed insertion #19860

Merged
merged 2 commits into from
Sep 28, 2023
Merged

Use comments for embed insertion #19860

merged 2 commits into from
Sep 28, 2023

Conversation

rijkvanzanten
Copy link
Member

In dev-mode, the elements aren't replaced as SERVE_APP is false. That'd cause the whole app to be wrapped in a non-existing custom element:

image

Which was due to the fact that we used <embed-head /> as the token to replace. By switching to a comment, we can prevent that type of weirdness if the embedding fails or isn't available in dev mode. Also switched the replacement from a regex to a string, as it's a known unique comment we're replacing.

@changeset-bot
Copy link

changeset-bot bot commented Sep 28, 2023

🦋 Changeset detected

Latest commit: 7417642

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 3 packages
Name Type
@directus/api Patch
@directus/app Patch
directus Patch

Not sure what this means? Click here to learn what changesets are.

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

@rijkvanzanten rijkvanzanten self-assigned this Sep 28, 2023
@rijkvanzanten rijkvanzanten merged commit fe0b1ef into main Sep 28, 2023
@rijkvanzanten rijkvanzanten deleted the optim/embed branch September 28, 2023 20:38
@github-actions github-actions bot added this to the Next Release milestone Sep 28, 2023
br-rafaelbarros pushed a commit to personal-forks/directus-source that referenced this pull request Nov 7, 2023
* Use comments for embed insertion

* Add changeset
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Feb 1, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
🍰 Optimization Codebase / repo optimization
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant