-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathastro.config.mjs
53 lines (53 loc) · 1.26 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
import {defineConfig} from "astro/config";
import UnoCSS from "unocss/astro";
import solidJs from "@astrojs/solid-js";
import cloudflare from "@astrojs/cloudflare";
import AstroPWA from "@vite-pwa/astro";
import {visualizer} from "rollup-plugin-visualizer";
const isDev = import.meta.env.DEV;
// https://astro.build/config
export default defineConfig({
integrations: [
UnoCSS(),
solidJs(),
AstroPWA({
workbox: {
disableDevLogs: true,
},
srcDir: "src",
filename: "sw.ts",
strategies: "injectManifest",
registerType: "autoUpdate",
// manifest: {},
devOptions: {
enabled: false,
type: "module",
/* other options */
},
injectManifest: {
globIgnores: ["**/_worker.js/**"],
},
}),
],
output: "server",
adapter: cloudflare({
platformProxy: {
enabled: true,
configPath: ".dev.vars",
},
}),
vite: {
// build: {
// minify: false,
// },
// ssr: {
// noExternal: ["@kobalte/core", "@internationalized/message"],
// },
plugins: [
visualizer({
// goal: ~100kib of HTML/CSS/Fonts (e.g. check network tab for amount loaded), and then ~300-350kib JS gzipped:
gzipSize: true,
}),
],
},
});