summaryrefslogtreecommitdiff
path: root/packages/integrations/react/src
diff options
context:
space:
mode:
authorGravatar matthewp <matthewp@users.noreply.github.com> 2023-08-16 17:44:01 +0000
committerGravatar astrobot-houston <fred+astrobot@astro.build> 2023-08-16 17:44:01 +0000
commitfb31ce55d943a88ff0d922cc2e4cca8d98a35eba (patch)
tree912c1554e73fde4ac2777b5f02566416f080bece /packages/integrations/react/src
parent16a3fdf93165a1a0404c1db0973871345b2c591b (diff)
downloadastro-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.ts22
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: {