build: drop tsx in favor of Node.js type stripping#1125
Merged
Conversation
0298710 to
fff7fd7
Compare
Deploying electron-website with
|
| Latest commit: |
d268a97
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://309e0eda.electron-website.pages.dev |
| Branch Preview URL: | https://build-drop-tsx.electron-website.pages.dev |
2f2a5c1 to
adf8749
Compare
adf8749 to
06b7abd
Compare
Assisted-by: Claude Opus 4.7
06b7abd to
d268a97
Compare
ckerr
approved these changes
May 19, 2026
erikian
reviewed
May 19, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description of Change
Main motivation here is the i18n deploy job has been failing since #1106, with some sort of JS import error.
To make this work we need to enforce file extensions (via
import/extensionsin oxlint) and enforce consistent usage oftypeimports (viatypescript/consistent-type-importsin oxlint).The helper scripts needed to be made ESM as part of this, so
import.meta.dirnamewas swapped in for__dirnameand that seems to be the only real change needed. There was also one minor tweak for importing from@docusaurus/loggerto keep things happy with ESM, and I made it throughout the codebase to keep things consistent. The overall code base can't make the ESM leap until Docusaurus better supports it upstream, I think their goal is v4 will be the one.There is one somewhat nasty hack in
scripts/prepare-i18n-content.tsto make this CJS vs ESM dance work, unfortunately.Checklist