From b6b045c3f15434f6875961dcb4a054797374908a Mon Sep 17 00:00:00 2001 From: bholmesdev Date: Thu, 2 Jun 2022 17:35:51 +0000 Subject: [PATCH] [ci] format --- packages/astro/src/@types/astro.ts | 5 ++++- packages/astro/src/vite-plugin-jsx/index.ts | 2 +- packages/integrations/solid/src/index.ts | 2 +- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/packages/astro/src/@types/astro.ts b/packages/astro/src/@types/astro.ts index ff158ffe1..97f94e389 100644 --- a/packages/astro/src/@types/astro.ts +++ b/packages/astro/src/@types/astro.ts @@ -793,7 +793,10 @@ export interface HydrateOptions { value?: string; } -export type JSXTransformConfig = Pick; +export type JSXTransformConfig = Pick< + babel.TransformOptions, + 'presets' | 'plugins' | 'inputSourceMap' +>; export type JSXTransformFn = (options: { mode: string; diff --git a/packages/astro/src/vite-plugin-jsx/index.ts b/packages/astro/src/vite-plugin-jsx/index.ts index 9881a7834..635db2d27 100644 --- a/packages/astro/src/vite-plugin-jsx/index.ts +++ b/packages/astro/src/vite-plugin-jsx/index.ts @@ -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: ""}`? diff --git a/packages/integrations/solid/src/index.ts b/packages/integrations/solid/src/index.ts index 00c61a75a..071d05a17 100644 --- a/packages/integrations/solid/src/index.ts +++ b/packages/integrations/solid/src/index.ts @@ -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, };