[go: nahoru, domu]

Skip to content

Commit

Permalink
[ci] yarn format
Browse files Browse the repository at this point in the history
  • Loading branch information
FredKSchott authored and actions-user committed Nov 17, 2021
1 parent a765698 commit 8506939
Showing 1 changed file with 12 additions and 15 deletions.
27 changes: 12 additions & 15 deletions packages/astro/src/vite-plugin-jsx/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -68,21 +68,18 @@ async function transformJSX({ code, mode, id, ssr, renderer }: TransformJSXOptio
const { jsxTransformOptions } = renderer;
const options = await jsxTransformOptions!({ mode, ssr });
const plugins = [...(options.plugins || [])];
const result = await babel.transformAsync(
code,
{
presets: options.presets,
plugins,
cwd: process.cwd(),
filename: id,
ast: false,
compact: false,
sourceMaps: true,
configFile: false,
babelrc: false,
}
);
// TODO: Be more strict about bad return values here.
const result = await babel.transformAsync(code, {
presets: options.presets,
plugins,
cwd: process.cwd(),
filename: id,
ast: false,
compact: false,
sourceMaps: true,
configFile: false,
babelrc: false,
});
// TODO: Be more strict about bad return values here.
// Should we throw an error instead? Should we never return `{code: ""}`?
if (!result) return null;
return {
Expand Down

0 comments on commit 8506939

Please sign in to comment.