Skip to content

feat: support tsx for TypeScript config loading#1

Merged
chiddekel merged 2 commits into
FreeWindowsHardwareFundation:mainfrom
chiddekel:feat/tsx-config-loader
Jul 2, 2026
Merged

feat: support tsx for TypeScript config loading#1
chiddekel merged 2 commits into
FreeWindowsHardwareFundation:mainfrom
chiddekel:feat/tsx-config-loader

Conversation

@chiddekel

Copy link
Copy Markdown

Summary

This PR carries the tsx TypeScript config loader work from chiddekel:feat/tsx-config-loader into this fork.

  • Add tsx/cjs as an automatic interpret/rechoir fallback loader for TypeScript webpack config files.
  • Preserve the existing loader order by appending tsx/cjs after the loaders already provided by interpret.
  • Add a focused TypeScript config fixture that proves webpack --mode=production works when only tsx is available for TypeScript config loading.

Upstream PR: webpack#4790

Test plan

  • git diff --check origin/main...HEAD
  • /home/developer/.cache/ms-playwright-go/1.57.0/node --check test/build/config-format/typescript-tsx/typescript.test.mjs
  • find test/build/config-format/typescript-tsx/node_modules -type f -name '*.js' -print -exec /home/developer/.cache/ms-playwright-go/1.57.0/node --check {} \;
  • /home/developer/.cache/ms-playwright-go/1.57.0/node -e "require('./node_modules/tsx/cjs'); const config = require('./webpack.config.ts'); console.log(config.entry, config.output.filename);"

Full Jest/build verification was not run in this environment because node/npm are not on PATH and project dependencies are not installed.

@chiddekel chiddekel merged commit a14eb76 into FreeWindowsHardwareFundation:main Jul 2, 2026
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.

1 participant