Files
wehub-resource-sync bb5c75ce05
Component Security Validation / Security Audit (push) Has been cancelled
Deploy to Cloudflare Pages / deploy (push) Has been cancelled
chore: import upstream snapshot with attribution
2026-07-13 12:38:58 +08:00

38 lines
961 B
JavaScript

import { defineConfig } from 'astro/config';
import react from '@astrojs/react';
import cloudflare from '@astrojs/cloudflare';
import tailwindcss from '@tailwindcss/vite';
export default defineConfig({
site: 'https://www.aitmpl.com',
output: 'server',
adapter: cloudflare({ mode: 'directory' }),
integrations: [react()],
vite: {
plugins: [
tailwindcss(),
{
name: 'cloudflare-react-dom-server',
config(_config, { command }) {
if (command === 'build') {
return {
resolve: {
alias: [
{ find: /^react-dom\/server$/, replacement: 'react-dom/server.node' },
],
},
ssr: { noExternal: ['react-dom'] },
};
}
},
},
],
resolve: {
dedupe: ['react', 'react-dom'],
},
ssr: {
external: ['node:fs', 'node:path', 'node:url', 'node:stream'],
},
},
});