Skip to content

Commit

Permalink
test: update test
Browse files Browse the repository at this point in the history
  • Loading branch information
yuusheng committed Jan 10, 2024
1 parent f5d3a16 commit 1343be6
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 10 deletions.
16 changes: 7 additions & 9 deletions src/babel.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,15 +45,13 @@ export default function transform(opts: TransformOptions): TRANSFORM_RESULT {
}

if (opts.jsx) {
_opts.plugins.push(require("@babel/plugin-syntax-jsx"))
_opts.plugins.push(
[
require('@babel/plugin-transform-react-jsx'),
{
...(typeof opts.jsx === "object" ? opts.jsx : {}),
},
]
);
_opts.plugins.push(require("@babel/plugin-syntax-jsx"));
_opts.plugins.push([
require("@babel/plugin-transform-react-jsx"),
{
...(typeof opts.jsx === "object" ? opts.jsx : {}),
},
]);
}

if (opts.legacy) {
Expand Down
2 changes: 1 addition & 1 deletion test/fixtures.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ describe("fixtures", async () => {
env: {
JITI_CACHE: "false",
JITI_ESM_RESOLVE: "true",
JITI_ENABLE_JSX: "true",
JITI_JSX: "true",
},
});

Expand Down

0 comments on commit 1343be6

Please sign in to comment.