From b3150121d1e7355b3073b760c1aeafa26e85a7ae Mon Sep 17 00:00:00 2001 From: matthewp Date: Thu, 13 Jan 2022 18:29:57 +0000 Subject: [PATCH] [ci] yarn format --- packages/astro/test/static-build-frameworks.test.js | 5 +---- packages/renderers/renderer-react/index.js | 13 +++++++++---- packages/renderers/renderer-react/jsx-runtime.js | 8 ++------ 3 files changed, 12 insertions(+), 14 deletions(-) diff --git a/packages/astro/test/static-build-frameworks.test.js b/packages/astro/test/static-build-frameworks.test.js index f653aa8fe..46e7371c1 100644 --- a/packages/astro/test/static-build-frameworks.test.js +++ b/packages/astro/test/static-build-frameworks.test.js @@ -8,10 +8,7 @@ describe('Static build - frameworks', () => { before(async () => { fixture = await loadFixture({ projectRoot: './fixtures/static-build-frameworks/', - renderers: [ - '@astrojs/renderer-preact', - '@astrojs/renderer-react' - ], + renderers: ['@astrojs/renderer-preact', '@astrojs/renderer-react'], buildOptions: { experimentalStaticBuild: true, }, diff --git a/packages/renderers/renderer-react/index.js b/packages/renderers/renderer-react/index.js index a3cedcf07..6dd5106dc 100644 --- a/packages/renderers/renderer-react/index.js +++ b/packages/renderers/renderer-react/index.js @@ -8,10 +8,15 @@ export default { default: { default: jsx }, } = await import('@babel/plugin-transform-react-jsx'); return { - plugins: [jsx({}, { - runtime: 'automatic', - importSource: '@astrojs/renderer-react' - })], + plugins: [ + jsx( + {}, + { + runtime: 'automatic', + importSource: '@astrojs/renderer-react', + } + ), + ], }; }, viteConfig() { diff --git a/packages/renderers/renderer-react/jsx-runtime.js b/packages/renderers/renderer-react/jsx-runtime.js index 1df555fc0..d86f698b9 100644 --- a/packages/renderers/renderer-react/jsx-runtime.js +++ b/packages/renderers/renderer-react/jsx-runtime.js @@ -2,11 +2,7 @@ // it can run in Node ESM. 'react' doesn't declare this module as an export map // So we have to use the .js. The .js is not added via the babel automatic JSX transform // hence this module as a workaround. -import jsxr from 'react/jsx-runtime.js'; +import jsxr from 'react/jsx-runtime.js'; const { jsx, jsxs, Fragment } = jsxr; -export { - jsx, - jsxs, - Fragment -}; +export { jsx, jsxs, Fragment };