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