-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathastro.config.ts
51 lines (49 loc) · 1.48 KB
/
astro.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
import { defineConfig } from 'astro/config';
import rawFiles from "./astro/raw-files";
import starlight from "@astrojs/starlight";
// https://astro.build/config
export default defineConfig({
site: 'https://sethp.github.io',
base: 'learn-gpgpu',
srcDir: ".",
integrations: [rawFiles(".spvasm", ".tcf"), starlight({
title: 'learn-gpgpu',
disable404Route: true,
})],
server: _ => ({
// headers: {
// // required for shared buffers (used by emscripten to implement pthreads)
// 'access-control-allow-origin': 'same-origin',
// 'cross-origin-opener-policy': 'same-origin',
// 'cross-origin-embedder-policy': 'require-corp'
// }
}),
vite: (() => {
// see also: `--mount` list in Dockerfile.build for an include list mirror to these
const viteExcludes = [
'**/__snapshots__/**',
'**/dist/**',
'**/hack/**',
'**/tmp/**',
'**/tools/**',
'**/wasm/build/**',
'**/wasm/cmake/**',
'**/wasm/SPIRV-Headers/**',
'**/wasm/SPIRV-Tools/**',
'**/wasm/talvos/**',
]
return ({
server: {
watch: {
ignored: viteExcludes,
}
},
optimizeDeps: {
// Otherwise, a big wall o' `Error: Failed to scan for dependencies from entries:` results.
// see: https://github.com/vitejs/vite/discussions/13306#discussioncomment-5973634
// and: https://github.com/vitejs/vite/blob/e444375d34db1e1902f06ab223e51d2d63cd10de/packages/vite/src/node/optimizer/scan.ts#L183
entries: ['**/**.html', ...viteExcludes.map(p => `!${p}`)],
},
});
})()
});