[ci] format

This commit is contained in:
bholmesdev 2022-06-02 17:35:51 +00:00 committed by github-actions[bot]
parent 2b35650b5d
commit b6b045c3f1
3 changed files with 6 additions and 3 deletions

View file

@ -793,7 +793,10 @@ export interface HydrateOptions {
value?: string;
}
export type JSXTransformConfig = Pick<babel.TransformOptions, 'presets' | 'plugins' | 'inputSourceMap'>;
export type JSXTransformConfig = Pick<
babel.TransformOptions,
'presets' | 'plugins' | 'inputSourceMap'
>;
export type JSXTransformFn = (options: {
mode: string;

View file

@ -63,7 +63,7 @@ async function transformJSX({
sourceMaps: true,
configFile: false,
babelrc: false,
inputSourceMap: options.inputSourceMap,
inputSourceMap: options.inputSourceMap,
});
// TODO: Be more strict about bad return values here.
// Should we throw an error instead? Should we never return `{code: ""}`?

View file

@ -13,7 +13,7 @@ function getRenderer(): AstroRenderer {
presets: [solid({}, { generate: ssr ? 'ssr' : 'dom', hydratable: true })],
plugins: [],
// Otherwise, babel will try to consume the source map generated by esbuild
// This causes unexpected issues with newline characters: https://github.com/withastro/astro/issues/3371
// This causes unexpected issues with newline characters: https://github.com/withastro/astro/issues/3371
// Note "vite-plugin-solid" does the same: https://github.com/solidjs/vite-plugin-solid/blob/master/src/index.ts#L344-L345
inputSourceMap: false as any,
};