fix: ensure we only use static building
This commit is contained in:
parent
8cd4324508
commit
4d591a6ad9
|
@ -1,31 +1,32 @@
|
||||||
import { defineConfig } from "astro/config";
|
import { defineConfig } from 'astro/config'
|
||||||
|
|
||||||
import react from "@astrojs/react";
|
import react from '@astrojs/react'
|
||||||
import tailwind from "@astrojs/tailwind";
|
import tailwind from '@astrojs/tailwind'
|
||||||
import optimizer from "vite-plugin-optimizer";
|
import optimizer from 'vite-plugin-optimizer'
|
||||||
import * as fs from "node:fs";
|
import * as fs from 'node:fs'
|
||||||
|
|
||||||
// https://astro.build/config
|
// https://astro.build/config
|
||||||
export default defineConfig({
|
export default defineConfig({
|
||||||
integrations: [react(), tailwind({ applyBaseStyles: false })],
|
output: 'static',
|
||||||
vite: {
|
integrations: [react(), tailwind({ applyBaseStyles: false })],
|
||||||
server:
|
vite: {
|
||||||
process.env.MODE === "development"
|
server:
|
||||||
? {
|
process.env.MODE === 'development'
|
||||||
https: {
|
? {
|
||||||
cert: fs.readFileSync("./.local-ssl/localhost.pem"),
|
https: {
|
||||||
key: fs.readFileSync("./.local-ssl/localhost-key.pem"),
|
cert: fs.readFileSync('./.local-ssl/localhost.pem'),
|
||||||
},
|
key: fs.readFileSync('./.local-ssl/localhost-key.pem'),
|
||||||
}
|
},
|
||||||
: {},
|
}
|
||||||
build: {
|
: {},
|
||||||
minify: false,
|
build: {
|
||||||
|
minify: false,
|
||||||
|
},
|
||||||
|
plugins: [
|
||||||
|
optimizer({
|
||||||
|
'node-fetch':
|
||||||
|
'const e = undefined; export default e;export {e as Response, e as FormData, e as Blob};',
|
||||||
|
}),
|
||||||
|
],
|
||||||
},
|
},
|
||||||
plugins: [
|
})
|
||||||
optimizer({
|
|
||||||
"node-fetch":
|
|
||||||
"const e = undefined; export default e;export {e as Response, e as FormData, e as Blob};",
|
|
||||||
}),
|
|
||||||
],
|
|
||||||
},
|
|
||||||
});
|
|
||||||
|
|
Loading…
Reference in New Issue