summaryrefslogtreecommitdiff
path: root/benchmark/packages/adapter/src/index.ts
blob: 0fc6d67f99c2a0ba7a0b0bf95267fda700c46847 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
import type { AstroIntegration } from 'astro';

export default function createIntegration(): AstroIntegration {
	return {
		name: '@benchmark/timer',
		hooks: {
			'astro:config:setup': ({ updateConfig }) => {
				updateConfig({
					vite: {
						ssr: {
							noExternal: ['@benchmark/timer'],
						},
					},
				});
			},
			'astro:config:done': ({ setAdapter }) => {
				setAdapter({
					name: '@benchmark/adapter',
					serverEntrypoint: '@benchmark/adapter/server.js',
					exports: ['manifest', 'createApp'],
					supportedAstroFeatures: {
						serverOutput: 'stable',
						envGetSecret: 'experimental',
						staticOutput: 'stable',
						hybridOutput: 'stable',
						i18nDomains: 'stable',
					},
				});
			},
		},
	};
}