-
Notifications
You must be signed in to change notification settings - Fork 15
/
vite.config.ts
56 lines (53 loc) · 1.43 KB
/
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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
import { defineConfig } from 'vite';
import { qwikVite } from '@builder.io/qwik/optimizer';
import { qwikCity } from '@builder.io/qwik-city/vite';
import tsconfigPaths from 'vite-tsconfig-paths';
import Inspect from 'vite-plugin-inspect'
import { fileURLToPath } from 'url';
import { qwikSpeakInline } from './packages/qwik-speak/tools/inline';
// import { rewriteRoutes } from './src/speak-routes';
export default defineConfig(() => {
return {
build: {
minify: false // To inspect production files
},
// Handle packages
resolve: {
alias: [
{ find: 'qwik-speak', replacement: fileURLToPath(new URL('./packages/qwik-speak/lib/index.qwik.mjs', import.meta.url)) },
]
},
plugins: [
qwikCity(
/** Uncomment this line to use url rewriting to translate paths */
// { rewriteRoutes }
),
qwikVite({
// Handle packages
vendorRoots: [
fileURLToPath(new URL('./packages/qwik-speak/lib', import.meta.url))
]
}),
qwikSpeakInline({
supportedLangs: ['en-US', 'it-IT', 'de-DE'],
defaultLang: 'en-US',
assetsPath: 'i18n',
autoKeys: true
}),
tsconfigPaths(),
//Inspect()
],
optimizeDeps: {
exclude: [],
include: [],
},
preview: {
headers: {
'Cache-Control': 'public, max-age=600',
},
},
test: {
include: ['./src/**']
},
};
});