Skip to content

feat: support loading config with tsx#260

Merged
ai merged 1 commit intopostcss:mainfrom
privatenumber:tsx
May 1, 2024
Merged

feat: support loading config with tsx#260
ai merged 1 commit intopostcss:mainfrom
privatenumber:tsx

Conversation

@privatenumber
Copy link
Copy Markdown
Contributor

@privatenumber privatenumber commented May 1, 2024

Notable Changes

Commit Message Summary (CHANGELOG)

leverage tsx to load TypeScript & ESM config files

Type

  • Perf
  • Feature

SemVer

  • Feature (:label: Minor)

Issues

Follow up to #249

Checklist

  • Lint and unit tests pass with my changes
  • I have added tests that prove my fix is effective/works
  • I have added necessary documentation (if appropriate)

cc @brc-dd

"module": "Preserve",
"esModuleInterop": true,
"allowJs": true,
"noEmit": true
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The previous settings were not type checking .js files

@ai
Copy link
Copy Markdown
Member

ai commented May 1, 2024

@brc-dd I remember that we spoke about tsx support for TS and for some reason decided that jiti is an only way. Do I remember it correctly?

@brc-dd
Copy link
Copy Markdown
Contributor

brc-dd commented May 1, 2024

Yeah. tsx added support for this today 😅 (privatenumber/tsx@42b7ede)

@privatenumber
Copy link
Copy Markdown
Contributor Author

Im also currently implementing a custom 'import()' with TypeScript support, so TLA would be supported too. But this would be limited to newer versions of Node that supports 'module.register()'.

@ai ai merged commit da69e94 into postcss:main May 1, 2024
@ai
Copy link
Copy Markdown
Member

ai commented May 1, 2024

Thanks to everyone. Released in 5.1.0.

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