Skip to content

Fix Webpack startup for Node 23+ by explicitly registering ts-node#154

Merged
pimterry merged 1 commit intohttptoolkit:mainfrom
RillJ:fix-webpack-node23-compat
May 6, 2025
Merged

Fix Webpack startup for Node 23+ by explicitly registering ts-node#154
pimterry merged 1 commit intohttptoolkit:mainfrom
RillJ:fix-webpack-node23-compat

Conversation

@RillJ
Copy link
Copy Markdown
Contributor

@RillJ RillJ commented May 6, 2025

Recent versions of Node (v23+) attempt to interpret TypeScript files directly, which breaks when loading TS-based Webpack config files. This repo uses TypeScript config files (e.g. webpack.dev.ts, webpack.prod.ts), and previously relied on older Node behavior or indirect loading.

This PR adds -r ts-node/register to the relevant npm scripts:

  • start:web
  • build:default
  • build:windows

This makes it compatible with newer Node versions without requiring contributors to downgrade. Existing behaviour on older versions of Node remains unchanged.

Fix for #153.

@CLAassistant
Copy link
Copy Markdown

CLAassistant commented May 6, 2025

CLA assistant check
All committers have signed the CLA.

@pimterry pimterry merged commit bb14c0b into httptoolkit:main May 6, 2025
7 checks passed
@pimterry
Copy link
Copy Markdown
Member

pimterry commented May 6, 2025

This is great, thanks @RillJ! Seems this was powered by some automatic webpack behaviour, which presumably conflicts with modern Node's approach. Doing this explicitly is much better 👍

In case you're not aware: all contributors to all the HTTP Toolkit repos get free HTTP Toolkit Pro. If that's something you're interested just let me know your email (here or via tim @ httptoolkit.com) and I'll set you up.

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.

3 participants