mirror of
https://github.com/remvze/moodist.git
synced 2025-12-18 17:34:17 +00:00
🛠️ 构建修复: - 改为 output: 'static' 静态构建 - 移除 Node.js 适配器依赖 - 修复 Docker 容器部署显示问题 - 确保静态文件能正确通过Nginx提供服务 ⚠️ 注意: 静态模式下API端点将不可用 如需API功能,需要改用Node.js服务器部署
43 lines
1 KiB
JavaScript
43 lines
1 KiB
JavaScript
import { defineConfig } from 'astro/config';
|
|
|
|
import react from '@astrojs/react';
|
|
import node from '@astrojs/node';
|
|
import AstroPWA from '@vite-pwa/astro';
|
|
|
|
export default defineConfig({
|
|
output: 'static',
|
|
integrations: [
|
|
react(),
|
|
AstroPWA({
|
|
manifest: {
|
|
background_color: '#09090b',
|
|
description: 'Ambient sounds for focus and calm.',
|
|
display: 'standalone',
|
|
icons: [
|
|
...[72, 128, 144, 152, 192, 256, 512].map(size => ({
|
|
sizes: `${size}x${size}`,
|
|
src: `/assets/pwa/${size}.png`,
|
|
type: 'image/png',
|
|
})),
|
|
],
|
|
name: 'Moodist',
|
|
orientation: 'any',
|
|
scope: '/',
|
|
short_name: 'Moodist',
|
|
start_url: '/',
|
|
theme_color: '#09090b',
|
|
},
|
|
registerType: 'prompt',
|
|
workbox: {
|
|
globPatterns: ['**/*'],
|
|
maximumFileSizeToCacheInBytes: Number.MAX_SAFE_INTEGER,
|
|
navigateFallback: '/',
|
|
},
|
|
}),
|
|
],
|
|
vite: {
|
|
define: {
|
|
global: 'globalThis',
|
|
},
|
|
},
|
|
});
|