Skip to content

JSX support #177

@not-Ryan

Description

@not-Ryan

Is there any way to support JSX in module files?

I've tried changing the esbuild options in unbuild:

// build.confg.ts
import { defineBuildConfig } from 'unbuild'

export default defineBuildConfig({
  rollup: {
    esbuild: {
      jsx: 'preserve',
      // or jsxFactory: 'h',
    },
  }
})

But it seems to ignore those options.

I still get React.createElement as output.

If I run mkdist --jsx=preserve I do get the runtime output with jsx preserved.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions