-
Notifications
You must be signed in to change notification settings - Fork 4
/
astro.config.ts
52 lines (50 loc) · 1.54 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
52
import { defineConfig } from 'astro/config';
import tailwind from '@astrojs/tailwind';
import svgSprite from 'astro-svg-sprite';
import tailwindConfig from './tailwind.config';
import postcssTailwindShortcuts from '@locomotivemtl/postcss-tailwind-shortcuts';
import removeDoubleParentheses from '@locomotivemtl/postcss-remove-double-parentheses';
const isProd = import.meta.env.PROD;
// https://astro.build/config
export default defineConfig({
site: 'https://locomotive-astro-boilerplate.vercel.app',
vite: {
css: {
preprocessorOptions: {
scss: {
api: 'modern-compiler',
additionalData: `
@use "sass:math";
@use "sass:list";
@use "@styles/tools/maths" as *;
@use "@styles/tools/functions" as *;
`
}
},
postcss: {
plugins: [
postcssTailwindShortcuts(tailwindConfig.theme, { prefix: 'theme' }),
removeDoubleParentheses()
]
}
},
esbuild: {
drop: isProd ? ['console', 'debugger'] : []
}
},
integrations: [
tailwind({
applyBaseStyles: false
}),
svgSprite({
include: './src/assets/svgs'
})
],
devToolbar: {
enabled: false
},
image: {
domains: ['locomotive.ca'],
remotePatterns: [{ protocol: 'https' }]
}
});