-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathastro.config.js
More file actions
87 lines (76 loc) · 2.58 KB
/
Copy pathastro.config.js
File metadata and controls
87 lines (76 loc) · 2.58 KB
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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
import compress from '@playform/compress';
import compressor from 'astro-compressor';
import cssInline from '@playform/inline';
import node from '@astrojs/node';
import pageInsight from 'astro-page-insight';
import svelte from '@astrojs/svelte';
import viteConfig from './vite.config';
import { defineConfig } from 'astro/config';
/** @see {@link https://astro.build/config} Documents */
export default defineConfig({
site: import.meta.env.WEB_URL,
output: 'hybrid',
adapter: node({
mode: 'standalone',
}),
server: {
port: Number(import.meta.env.WEB_PORT) || void 0,
},
redirects: {
'/members': '/', // メンバーページは非表示化しているのでトップページにリダイレクト
},
integrations: [
/**
* Astro 内で Svelte を使用するためのインテグレーション
*
* @see {@link https://docs.astro.build/en/guides/integrations-guide/svelte/} Documents
* @see {@link https://www.npmjs.com/package/@astrojs/svelte} npm
*/
svelte(),
/**
* Astro の開発環境でページのパフォーマンスを計測するためのインテグレーション
*
* @see {@link https://astro-page-insight.pages.dev} Documents
* @see {@link https://www.npmjs.com/package/astro-page-insight} npm
*/
pageInsight(),
/**
* Astro のビルド時に HTML に CSS をインラインで埋め込むためのインテグレーション
*
* @see {@link https://github.com/Playform/Inline#ReadMe} Documents
* @see {@link https://www.npmjs.com/package/@playform/inline} npm
*/
cssInline({
Critters: {
pruneSource: true,
inlineFonts: false,
},
Logger: 1,
}),
/**
* Astro のビルド時にさまざまなファイルを圧縮するためのインテグレーション
*
* @see {@link https://github.com/Playform/Compress#ReadMe} Documents
* @see {@link https://www.npmjs.com/package/@playform/compress} npm
* @see {@link https://github.com/Playform/Compress/blob/rebase/Source/Interface/Option.ts} Full Options type
*/ // @ts-ignore
compress({
CSS: true,
SVG: true,
HTML: true,
Image: false,
JavaScript: false,
Logger: 1,
}),
/**
* Astro のビルド時に HTML を圧縮ファイルに変換するためのインテグレーション
*
* @see {@link https://github.com/sondr3/astro-compressor#readme} Documents
* @see {@link https://www.npmjs.com/package/astro-compressor} npm
*/
compressor({
gzip: false,
}),
],
vite: viteConfig,
});