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

remove excess whitespace from $html-tagged template literals #16762

Merged
merged 1 commit into from
Jan 12, 2025

Conversation

schlawg
Copy link
Collaborator

@schlawg schlawg commented Jan 12, 2025

Use an esbuild load plugin to transform:

const someHtml = $html`
  <div>
    <span>
      <button>button text</button>
    </span>
  </div>`;

into

const someHtml = `<div><span><button>button text</button></span></div>`;

at build time

@ornicar ornicar merged commit 86a2451 into lichess-org:master Jan 12, 2025
3 checks passed
@schlawg schlawg deleted the ui-minify-inline-html branch January 14, 2025 01:35
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.

2 participants