astro/packages/renderers/renderer-preact/index.js
Nate Moore 19d45496e7 [next] Update renderers (#1509)
* chore: update vite

* fix(renderers): point renderers to resolved server/client entrypoints
2021-10-15 14:10:26 -06:00

15 lines
458 B
JavaScript

export default {
name: '@astrojs/renderer-preact',
client: './client.js',
server: './server.js',
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' })],
};
},
};