2023-11-01 22:01:55 +00:00
|
|
|
import { defineConfig } from "astro/config";
|
2023-10-09 18:46:41 +00:00
|
|
|
|
2023-11-01 22:01:55 +00:00
|
|
|
import react from "@astrojs/react";
|
|
|
|
import tailwind from "@astrojs/tailwind";
|
|
|
|
import optimizer from "vite-plugin-optimizer";
|
|
|
|
import * as fs from "node:fs";
|
2023-10-09 18:46:41 +00:00
|
|
|
|
|
|
|
// https://astro.build/config
|
|
|
|
export default defineConfig({
|
2023-11-01 22:01:55 +00:00
|
|
|
integrations: [react(), tailwind({ applyBaseStyles: false })],
|
2023-10-11 13:46:46 +00:00
|
|
|
vite: {
|
2023-11-01 22:01:55 +00:00
|
|
|
server:
|
|
|
|
process.env.MODE === "development"
|
|
|
|
? {
|
|
|
|
https: {
|
|
|
|
cert: fs.readFileSync("./.local-ssl/localhost.pem"),
|
|
|
|
key: fs.readFileSync("./.local-ssl/localhost-key.pem"),
|
|
|
|
},
|
|
|
|
}
|
|
|
|
: {},
|
|
|
|
build: {
|
|
|
|
minify: false,
|
2023-10-12 10:33:33 +00:00
|
|
|
},
|
2023-10-11 13:46:46 +00:00
|
|
|
plugins: [
|
|
|
|
optimizer({
|
2023-11-01 22:01:55 +00:00
|
|
|
"node-fetch":
|
|
|
|
"const e = undefined; export default e;export {e as Response, e as FormData, e as Blob};",
|
2023-10-11 13:46:46 +00:00
|
|
|
}),
|
2023-11-01 22:01:55 +00:00
|
|
|
],
|
|
|
|
},
|
|
|
|
});
|