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

Fix the widget `require` export that points at the browser bundle

Geschlossen
#179 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
3/5
Geschätzter Aufwand
1-2 Tage
Anfängerfreundlichkeit
72/100
Issue-Typ
Bug
Klarheit
Klar beschrieben
Aktivitätsstatus
Aktiv
Tech-Stack
node.js, typescript

Rechercherichtung

Start with packages/widget/package.json and inspect its exports, main, and dist/chatcops.min.js entries; then read CONTRIBUTING.md for the pnpm build workflow. Check the root package scripts and CI configuration to see how the three packages are built and validated. Done when publint passes for core, server, and widget, the widget export has only types and import, the quick start script tag still works, and a patch changeset is added.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Beschreibung

bug good first issue hacktoberfest widget

packages/widget/package.json maps require to ./dist/chatcops.min.js (line 13). That file is the IIFE for script tags: it assigns window.ChatCops and never sets module.exports. The package is also "type": "module", so Node loads that file as ESM anyway. require('@chatcops/widget') therefore never returns the widget API.

What to do

  • Remove the require condition, so CommonJS consumers get a clear error (or use Node's require(esm) on the import file) instead of a silent empty object.
  • Leave main and the dist/chatcops.min.js path alone: the CDN snippet in the docs links to that file directly.
  • Add publint as a root dev dependency and a pnpm publint script that checks all three packages, and run it in CI after the build.

Acceptance criteria

  • exports["."] in the widget has types and import only
  • pnpm publint passes for core, server and widget (fix or explain anything else it reports)
  • The script tag snippet from the quick start still works with the built file
  • 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.