File tree Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -57,6 +57,10 @@ export interface PreactPluginOptions {
57
57
* Babel configuration applied in both dev and prod.
58
58
*/
59
59
babel ?: BabelOptions ;
60
+ /**
61
+ * Import Source for jsx. Defaults to "preact".
62
+ */
63
+ jsxImportSource ?: string ;
60
64
}
61
65
62
66
export interface PreactBabelOptions extends BabelOptions {
@@ -77,6 +81,7 @@ function preactPlugin({
77
81
include,
78
82
exclude,
79
83
babel,
84
+ jsxImportSource,
80
85
} : PreactPluginOptions = { } ) : Plugin [ ] {
81
86
const baseParserOptions = [
82
87
"importMeta" ,
@@ -157,7 +162,7 @@ function preactPlugin({
157
162
: "@babel/plugin-transform-react-jsx-development" ,
158
163
{
159
164
runtime : "automatic" ,
160
- importSource : "preact" ,
165
+ importSource : jsxImportSource ?? "preact" ,
161
166
} ,
162
167
] ,
163
168
...( config . isProduction ? [ ] : [ "babel-plugin-transform-hook-names" ] ) ,
You can’t perform that action at this time.
0 commit comments