File tree Expand file tree Collapse file tree 1 file changed +6
-0
lines changed
packages/vite/src/node/plugins Expand file tree Collapse file tree 1 file changed +6
-0
lines changed Original file line number Diff line number Diff line change @@ -71,12 +71,15 @@ export function setOxcTransformOptionsFromTsconfigOptions(
7171 }
7272 if ( oxcOptions . jsx !== 'preserve' ) {
7373 const jsxOptions : OxcJsxOptions = { ...oxcOptions . jsx }
74+ const typescriptOptions = { ...oxcOptions . typescript }
7475
7576 if ( tsCompilerOptions . jsxFactory ) {
7677 jsxOptions . pragma ??= tsCompilerOptions . jsxFactory
78+ typescriptOptions . jsxPragma = jsxOptions . pragma
7779 }
7880 if ( tsCompilerOptions . jsxFragmentFactory ) {
7981 jsxOptions . pragmaFrag ??= tsCompilerOptions . jsxFragmentFactory
82+ typescriptOptions . jsxPragmaFrag = jsxOptions . pragmaFrag
8083 }
8184 if ( tsCompilerOptions . jsxImportSource ) {
8285 jsxOptions . importSource ??= tsCompilerOptions . jsxImportSource
@@ -96,14 +99,17 @@ export function setOxcTransformOptionsFromTsconfigOptions(
9699 jsxOptions . runtime = 'automatic'
97100 // these options should not be set when using automatic runtime
98101 jsxOptions . pragma = undefined
102+ typescriptOptions . jsxPragma = undefined
99103 jsxOptions . pragmaFrag = undefined
104+ typescriptOptions . jsxPragmaFrag = undefined
100105 break
101106 default :
102107 break
103108 }
104109 }
105110
106111 oxcOptions . jsx = jsxOptions
112+ oxcOptions . typescript = typescriptOptions
107113 }
108114
109115 if ( oxcOptions . decorator ?. legacy === undefined ) {
You can’t perform that action at this time.
0 commit comments