diff options
author | 2023-08-16 17:44:01 +0000 | |
---|---|---|
committer | 2023-08-16 17:44:01 +0000 | |
commit | fb31ce55d943a88ff0d922cc2e4cca8d98a35eba (patch) | |
tree | 912c1554e73fde4ac2777b5f02566416f080bece /packages/integrations/react/src | |
parent | 16a3fdf93165a1a0404c1db0973871345b2c591b (diff) | |
download | astro-fb31ce55d943a88ff0d922cc2e4cca8d98a35eba.tar.gz astro-fb31ce55d943a88ff0d922cc2e4cca8d98a35eba.tar.zst astro-fb31ce55d943a88ff0d922cc2e4cca8d98a35eba.zip |
[ci] format
Diffstat (limited to 'packages/integrations/react/src')
-rw-r--r-- | packages/integrations/react/src/index.ts | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/packages/integrations/react/src/index.ts b/packages/integrations/react/src/index.ts index 556062282..d1cd7c4e6 100644 --- a/packages/integrations/react/src/index.ts +++ b/packages/integrations/react/src/index.ts @@ -39,23 +39,23 @@ function getRenderer() { function optionsPlugin(experimentalReactChildren: boolean): vite.Plugin { const virtualModule = 'astro:react:opts'; - const virtualModuleId = '\0' + virtualModule; - return { + const virtualModuleId = '\0' + virtualModule; + return { name: '@astrojs/react:opts', resolveId(id) { - if(id === virtualModule) { + if (id === virtualModule) { return virtualModuleId; } }, load(id) { - if(id === virtualModuleId) { + if (id === virtualModuleId) { return { code: `export default { experimentalReactChildren: ${JSON.stringify(experimentalReactChildren)} - }` + }`, }; } - } + }, }; } @@ -93,17 +93,17 @@ function getViteConfiguration(experimentalReactChildren: boolean) { 'use-immer', ], }, - plugins: [ - optionsPlugin(experimentalReactChildren) - ] + plugins: [optionsPlugin(experimentalReactChildren)], }; } export type ReactIntegrationOptions = { experimentalReactChildren: boolean; -} +}; -export default function ({ experimentalReactChildren }: ReactIntegrationOptions = { experimentalReactChildren: false }): AstroIntegration { +export default function ( + { experimentalReactChildren }: ReactIntegrationOptions = { experimentalReactChildren: false } +): AstroIntegration { return { name: '@astrojs/react', hooks: { |