0
Fork 0
mirror of https://github.com/withastro/astro.git synced 2024-12-23 21:53:55 -05:00
astro/packages/renderers/renderer-react/index.js
2021-07-21 23:11:40 +00:00

15 lines
456 B
JavaScript

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' })],
};
},
};