-
Notifications
You must be signed in to change notification settings - Fork 20
/
astro.config.mjs
45 lines (43 loc) · 1.36 KB
/
astro.config.mjs
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
// @ts-check
import mdx from '@astrojs/mdx';
import partytown from '@astrojs/partytown';
import react from '@astrojs/react';
import { defineConfig } from 'astro/config';
import remarkEmoji from 'remark-emoji';
import remarkCodeBlock from './src/remark/remark-code-block';
import remarkIndexIdHeader from './src/remark/remark-index-id-header';
// https://astro.build/config
export default defineConfig({
prefetch: {
prefetchAll: true,
defaultStrategy: 'viewport',
},
integrations: [
mdx(),
react(),
partytown({
config: {
// https://partytown.builder.io/google-tag-manager#google-analytics-4-ga4
forward: ['dataLayer.push'],
},
}),
],
markdown: {
syntaxHighlight: false,
remarkPlugins: [remarkIndexIdHeader, remarkCodeBlock, remarkEmoji],
},
vite: {
css: {
preprocessorOptions: {
scss: {
// Deprecation [legacy-js-api]: The legacy JS API is deprecated and will be removed in Dart Sass 2.0.0.
// を出ないようにするために sass-embedded を指定
// 参考: https://retrorocket.biz/archives/fix-scss-deprecate-with-astro-v4
api: 'modern-compiler',
// media query での出し分けのための mixin をグローバルで使えるように
additionalData: `@use "./src/styles/mixin.scss" as *;`,
},
},
},
},
});