mirror of
https://github.com/remvze/moodist.git
synced 2025-12-19 01:44:15 +00:00
🛠️ 构建修复: - 添加 @astrojs/node 适配器 (v8.3.4) - 配置 standalone 模式用于 Docker 部署 - 修复 "No adapter installed" 构建错误 - 更新 package-lock.json 依赖锁定 📦 这确保了 v3.0.0 镜像能够正常构建和运行
46 lines
1.1 KiB
JavaScript
46 lines
1.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: 'server',
|
|
adapter: node({
|
|
mode: 'standalone'
|
|
}),
|
|
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',
|
|
},
|
|
},
|
|
});
|