Hacktoberfest 2026: die Issues, die Maintainer für den Oktober markiert haben – offen und einsteigerfreundlich. Hacktoberfest-Issues durchsuchen

Make the widget bundle at least 600 bytes smaller (gzipped) without changing behavior

Offen
#235 0 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen

Maintainer antworten meist innerhalb von 1 Tag

Dieses Issue hat noch niemand übernommen.

Bewertung

Schwierigkeit
4/5
Geschätzter Aufwand
3-5 Tage
Anfängerfreundlichkeit
35/100
Issue-Typ
Refactoring
Klarheit
Klar beschrieben
Aktivitätsstatus
Aktiv
Tech-Stack
typescript, vite

Rechercherichtung

Build the widget with pnpm --filter @chatcops/widget build, then run pnpm size and inspect the bundle using npx size-limit --why or source-map-explorer. Focus on markdown.ts, theme.ts, the listed dom files, i18n.ts, styles/widget.css and vite.config.ts; leave the three named files untouched. Done means at least 600 gzipped bytes saved with identical behavior, unchanged unit and browser tests passing, before and after size output in the PR, one-line reasons for changes, and a patch changeset.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Beschreibung

enhancement hacktoberfest help wanted widget

The script tag bundle (packages/widget/dist/chatcops.min.js) has to stay under 14 kB gzipped, and CI checks it with pnpm size (limits in .size-limit.json). It's at about 13.5 kB today. The next two releases add a new stream parser and session handling to the widget, which will take most of what's left. This issue frees up room before that.

This is for someone who has had at least 3 PRs merged here. Shaving bytes is easy to overdo, and every change has to keep the widget working exactly the same.

What to do

  • Run pnpm --filter @chatcops/widget build and pnpm size, then look at what's big. npx size-limit --why or source-map-explorer on the build both work.
  • Find savings in markdown.ts, theme.ts, dom/prechat-form.ts, dom/panel.ts, dom/bubble.ts, i18n.ts or styles/widget.css. Typical wins: duplicated helpers, CSS rules nobody uses, long repeated strings, code that vite.config.ts could minify better.
  • Leave api/client.ts, widget.ts and dom/messages.ts alone. I'm rewriting those next month.
  • No new dependencies, no build tool change, and no behavior change. Visible text, class names, CSS custom properties and the public API stay the same.

Acceptance criteria

  • dist/chatcops.min.js is at least 600 bytes smaller gzipped. Put the pnpm size output from before and after in the PR
  • Every unit test and every browser test (pnpm e2e) passes unchanged. Changing a test to make it pass doesn't count
  • Each change has a one-line reason in the PR description
  • Changeset for @chatcops/widget (patch)

Want to work on this? Comment below and I'll assign it to you. Please take one issue at a time, branch off dev, and open your PR against dev with Closes #<this issue number>. Setup notes (pnpm, build before test) are in CONTRIBUTING.md.

Vorherrschende Sprache
TypeScript
Sterne
13
Forks
7
Ø Merge
4 Std. 11 Min.
Gemergte PRs (30 T.)
122

Entwicklungsumgebung

Erste Schritte

  1. Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
  3. Forken Sie das Repository und arbeiten Sie in einem Branch.
  4. Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.

Mehr aus codercops/chatcops

Alle Issues in codercops/chatcops

Ähnliche Issues

Weitere Issues zu TypeScript

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.