summaryrefslogtreecommitdiff
path: root/packages/integrations/preact
diff options
context:
space:
mode:
authorGravatar Fred K. Schott <fkschott@gmail.com> 2022-04-02 14:15:41 -0600
committerGravatar GitHub <noreply@github.com> 2022-04-02 14:15:41 -0600
commit1335797903a57716e9a02b0ffd8ca636b3883c62 (patch)
treed8835124fec7ab80bfbf25c6d9c5a57039a1c56d /packages/integrations/preact
parentd63213f1198293e72bb9d9734bf4ec8309c515d4 (diff)
downloadastro-1335797903a57716e9a02b0ffd8ca636b3883c62.tar.gz
astro-1335797903a57716e9a02b0ffd8ca636b3883c62.tar.zst
astro-1335797903a57716e9a02b0ffd8ca636b3883c62.zip
update prettier width (#2968)
Diffstat (limited to 'packages/integrations/preact')
-rw-r--r--packages/integrations/preact/client.js6
-rw-r--r--packages/integrations/preact/server.js4
-rw-r--r--packages/integrations/preact/src/index.ts7
3 files changed, 14 insertions, 3 deletions
diff --git a/packages/integrations/preact/client.js b/packages/integrations/preact/client.js
index 85c18c76c..5ece5ddb2 100644
--- a/packages/integrations/preact/client.js
+++ b/packages/integrations/preact/client.js
@@ -1,4 +1,8 @@
import { h, render } from 'preact';
import StaticHtml from './static-html.js';
-export default (element) => (Component, props, children) => render(h(Component, props, children != null ? h(StaticHtml, { value: children }) : children), element);
+export default (element) => (Component, props, children) =>
+ render(
+ h(Component, props, children != null ? h(StaticHtml, { value: children }) : children),
+ element
+ );
diff --git a/packages/integrations/preact/server.js b/packages/integrations/preact/server.js
index 25b1a1530..0729f42e9 100644
--- a/packages/integrations/preact/server.js
+++ b/packages/integrations/preact/server.js
@@ -25,7 +25,9 @@ function check(Component, props, children) {
}
function renderToStaticMarkup(Component, props, children) {
- const html = render(h(Component, props, children != null ? h(StaticHtml, { value: children }) : children));
+ const html = render(
+ h(Component, props, children != null ? h(StaticHtml, { value: children }) : children)
+ );
return { html };
}
diff --git a/packages/integrations/preact/src/index.ts b/packages/integrations/preact/src/index.ts
index c96bf1190..0b0896210 100644
--- a/packages/integrations/preact/src/index.ts
+++ b/packages/integrations/preact/src/index.ts
@@ -21,7 +21,12 @@ function getRenderer() {
function getViteConfiguration() {
return {
optimizeDeps: {
- include: ['@astrojs/preact/client.js', 'preact', 'preact/jsx-runtime', 'preact-render-to-string'],
+ include: [
+ '@astrojs/preact/client.js',
+ 'preact',
+ 'preact/jsx-runtime',
+ 'preact-render-to-string',
+ ],
exclude: ['@astrojs/preact/server.js'],
},
ssr: {