forked from vendure-ecommerce/storefront-qwik-starter
-
Notifications
You must be signed in to change notification settings - Fork 0
/
vite.config.ts
29 lines (28 loc) · 753 Bytes
/
vite.config.ts
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
import { qwikCity } from '@builder.io/qwik-city/vite';
import { insightsEntryStrategy } from '@builder.io/qwik-labs/vite';
import { qwikVite } from '@builder.io/qwik/optimizer';
import { defineConfig, loadEnv } from 'vite';
import tsconfigPaths from 'vite-tsconfig-paths';
export default defineConfig(async (config) => {
return {
// Enable to analyze via source-map-explorer
ssr: { target: 'webworker' },
build: {
sourcemap: config.mode === 'development',
},
plugins: [
qwikCity(),
qwikVite({
entryStrategy: await insightsEntryStrategy({
publicApiKey: loadEnv('', '.').VITE_QWIK_INSIGHTS_KEY,
}),
}),
tsconfigPaths(),
],
preview: {
headers: {
'Cache-Control': 'public, max-age=600',
},
},
};
});