Skip to content

[code-infra] Support JSX and TS in bundle scripts #335

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
May 22, 2025
Merged

Conversation

Janpot
Copy link
Member

@Janpot Janpot commented May 20, 2025

Allow JSX and TS in custom bundle scripts. Also add a method for resolving package.json files in case no /package.json export is available and the user is on node 22.14+.

Confirmed in base ui that this allows for entries such as

{
  id: 'custom',
  code: `
    import { Field } from '@base-ui-components/react/field';
    export default <>
      <Field.Root />
      <Field.Label />
    </>
  `,
  externals: ['react', 'react-dom'],
}

@Janpot Janpot added the scope: code-infra Specific to the core-infra product label May 20, 2025
@Janpot Janpot marked this pull request as ready for review May 21, 2025 14:59
@Janpot Janpot requested a review from a team May 21, 2025 14:59
@Janpot Janpot merged commit a194291 into master May 22, 2025
7 checks passed
@Janpot Janpot deleted the jsx-bundle branch May 22, 2025 10:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
scope: code-infra Specific to the core-infra product
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants