-
Notifications
You must be signed in to change notification settings - Fork 0
/
astro.config.mjs
62 lines (58 loc) · 1.33 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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
import { createRequire } from "module"
import path from "path"
import { fileURLToPath } from "url"
import sitemap from "@astrojs/sitemap"
import yaml from "@rollup/plugin-yaml"
import { defineConfig } from "astro/config"
import compress from "astro-compress"
import tailwind from "@astrojs/tailwind";
const __dirname = path.dirname(fileURLToPath(import.meta.url))
export const CONSTANTS = {
aliasPrefix: {
root: "~",
src: "@",
types: "#",
},
}
/**
* @docs https://astro.build/config
*/
export default defineConfig({
site: "https://wd-flat.com/",
integrations: [
compress({
path: ["./dist"],
css: true,
js: true,
html: false,
img: false,
svg: true,
}),
sitemap(),
[tailwind({
applyBaseStyles: false,
})],
],
vite: {
build: {
minify: false,
rollupOptions: {
output: {
assetFileNames: "[ext]/[name][extname]",
entryFileNames: "js/app.js",
},
},
},
plugins: [yaml()],
resolve: {
alias: {
[CONSTANTS.aliasPrefix.root]: path.resolve(__dirname, "./"),
[CONSTANTS.aliasPrefix.src]: path.resolve(__dirname, "./src"),
[CONSTANTS.aliasPrefix.types]: path.resolve(__dirname, "./src/types"),
},
},
define: {
require: createRequire(import.meta.url),
},
},
})