summaryrefslogtreecommitdiff
path: root/packages/renderers/renderer-preact/index.js
blob: 68e79dcc674e3dfc69e52928a13b42734a23117e (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
export default {
  name: '@astrojs/renderer-preact',
  client: './client',
  server: './server',
  knownEntrypoints: ['preact', 'preact/jsx-runtime', 'preact-render-to-string'],
  jsxImportSource: 'preact',
  jsxTransformOptions: async () => {
    const {
      default: { default: jsx },
    } = await import('@babel/plugin-transform-react-jsx');
    return {
      plugins: [jsx({}, { runtime: 'automatic', importSource: 'preact' })],
    };
  },
};