Hacktoberfest 2026: los issues que los mantenedores marcaron para octubre, abiertos y aptos para principiantes. Explorar issues de Hacktoberfest

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

Cerrado
#179 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 1 día

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
3/5
Tiempo estimado
1-2 días
Aptitud para principiantes
72/100
Tipo de issue
Error
Claridad
Bien especificado
Estado de actividad
Activo
Stack tecnológico
node.js, typescript

Línea de trabajo

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.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

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.

Lenguaje dominante
TypeScript
Estrellas
13
Forks
7
Merge medio
4 h 11 min
PR fusionados (30 d)
122

Preparar el entorno

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de codercops/chatcops

Todos los issues de codercops/chatcops

Issues similares

Más issues de TypeScript

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.