[ci] yarn format
This commit is contained in:
parent
a765698a8e
commit
850693957c
1 changed files with 12 additions and 15 deletions
|
@ -68,21 +68,18 @@ async function transformJSX({ code, mode, id, ssr, renderer }: TransformJSXOptio
|
||||||
const { jsxTransformOptions } = renderer;
|
const { jsxTransformOptions } = renderer;
|
||||||
const options = await jsxTransformOptions!({ mode, ssr });
|
const options = await jsxTransformOptions!({ mode, ssr });
|
||||||
const plugins = [...(options.plugins || [])];
|
const plugins = [...(options.plugins || [])];
|
||||||
const result = await babel.transformAsync(
|
const result = await babel.transformAsync(code, {
|
||||||
code,
|
presets: options.presets,
|
||||||
{
|
plugins,
|
||||||
presets: options.presets,
|
cwd: process.cwd(),
|
||||||
plugins,
|
filename: id,
|
||||||
cwd: process.cwd(),
|
ast: false,
|
||||||
filename: id,
|
compact: false,
|
||||||
ast: false,
|
sourceMaps: true,
|
||||||
compact: false,
|
configFile: false,
|
||||||
sourceMaps: true,
|
babelrc: false,
|
||||||
configFile: false,
|
});
|
||||||
babelrc: false,
|
// TODO: Be more strict about bad return values here.
|
||||||
}
|
|
||||||
);
|
|
||||||
// TODO: Be more strict about bad return values here.
|
|
||||||
// Should we throw an error instead? Should we never return `{code: ""}`?
|
// Should we throw an error instead? Should we never return `{code: ""}`?
|
||||||
if (!result) return null;
|
if (!result) return null;
|
||||||
return {
|
return {
|
||||||
|
|
Loading…
Add table
Reference in a new issue