Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

Add node emulation to `typehead serve`

Open
#2 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
35/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Stale
Domain
build-system, cli

Research direction

Start at the typehead serve entry point and inspect how its esbuild configuration is assembled. Implement the two requested node-emulation steps, then verify that serve handles Node-style globals and modules without adding them to the regular bundle.

Written by the indexing model from the issue text.

Description

Description

Parcel bundler has "node integration" which mirrors what Webpack, Browserify, etc do. We wouldn't want to include this in the actual bundle, in case users are using Node.js or a platform we don't recognize, but we can do the following for typescript serve:

  1. Prepend a window.global = global; since ESBuild doesn't do this by default.
  2. Add the esbuild-plugin-node-emulation plugin.
Dominant language
JavaScript
Stars
24
Forks
2
PR merge metrics
No merged PRs in 30d

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from mapbox/typehead

All issues in mapbox/typehead

Similar issues

More JavaScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.