@@ -71,6 +71,7 @@ export default async function microbundle(inputOptions) {
71
71
options . pkg . name = pkgName ;
72
72
73
73
if ( options . sourcemap === 'inline' ) {
74
+ // eslint-disable-next-line no-console
74
75
console . log (
75
76
'Warning: inline sourcemaps should only be used for debugging purposes.' ,
76
77
) ;
@@ -549,9 +550,16 @@ function createConfig(options, entry, format, writeMeta) {
549
550
...( options . generateTypes !== false && {
550
551
declarationDir : getDeclarationDir ( { options, pkg } ) ,
551
552
} ) ,
552
- jsx : 'preserve' ,
553
- jsxFactory : options . jsx ,
554
- jsxFragmentFactory : options . jsxFragment ,
553
+ ...( options . jsxImportSource
554
+ ? {
555
+ jsx : 'react-jsx' ,
556
+ jsxImportSource : options . jsxImportSource ,
557
+ }
558
+ : {
559
+ jsx : 'preserve' ,
560
+ jsxFactory : options . jsx ,
561
+ jsxFragmentFactory : options . jsxFragment ,
562
+ } ) ,
555
563
} ,
556
564
files : options . entries ,
557
565
} ,
@@ -642,6 +650,7 @@ function createConfig(options, entry, format, writeMeta) {
642
650
options . visualize && visualizer ( ) ,
643
651
// NOTE: OMT only works with amd and esm
644
652
// Source: https://github.com/surma/rollup-plugin-off-main-thread#config
653
+ // eslint-disable-next-line new-cap
645
654
useWorkerLoader && ( format === 'es' || modern ) && OMT ( ) ,
646
655
/** @type {import('rollup').Plugin } */
647
656
( {
0 commit comments