-
-
Notifications
You must be signed in to change notification settings - Fork 141
Closed
Labels
Description
Reproduction link or steps
Was having issues transforming react code.
"tsdown": "^0.15.4",
Config
import { defineConfig } from 'tsdown'
export default defineConfig({
entry: [
'src/index.ts',
'src/map/**/*',
'!src/**/*.stories.{ts,tsx}',
'!src/**/*.test.{ts,tsx}',
],
dts: true,
clean: true,
sourcemap: true,
minify: false,
target: 'es2022',
outDir: 'dist',
exports: true,
inputOptions: {
transform: {
jsx: 'react-jsx',
},
},
})jsx?: false | "react" | "react-jsx" | "preserve" | JsxOptions; is the type of inputOptions.transform.jsx but this error will throw
Warning: Invalid input options (1 issue found)
- For the "transform.jsx". Invalid type: Expected ("preserve" | Object) but received "react-jsx". Second, if you have preserve in tsconfig, but react-jsx in inputOptions.transform.jsx, tsconfig will override the tsdown config setting for jsx, which I don't believe in intended behavior
I set tsconfig and tsdown settings to both react-jsx.
What is expected?
Transforms correctly.
What is actually happening?
see above
Any additional comments?
No response
Reactions are currently unavailable