Skip to content

feat: support tsx for TypeScript config loading#4790

Open
chiddekel wants to merge 1 commit into
webpack:mainfrom
chiddekel:feat/tsx-config-loader
Open

feat: support tsx for TypeScript config loading#4790
chiddekel wants to merge 1 commit into
webpack:mainfrom
chiddekel:feat/tsx-config-loader

Conversation

@chiddekel

@chiddekel chiddekel commented Jul 2, 2026

Copy link
Copy Markdown

Summary

  • 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.

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.

@changeset-bot

changeset-bot Bot commented Jul 2, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: 516ea6e

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@linux-foundation-easycla

linux-foundation-easycla Bot commented Jul 2, 2026

Copy link
Copy Markdown

CLA Signed
The committers listed above are authorized under a signed CLA.

@chiddekel chiddekel force-pushed the feat/tsx-config-loader branch from 43ffc93 to 516ea6e Compare July 2, 2026 15:30
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