feat: skeleton loaders, Sentry source maps, auto-deploy via webhook
RoomSkeleton: shimmer skeleton matching Room header/timeline/input layout, used as Suspense fallback for all three Room routes (home/direct/space) Sentry source maps: @sentry/vite-plugin uploads 72 hidden source map files to Sentry on each build then deletes them from dist — stack traces now show real file/line numbers instead of minified bundle positions. Auth token loaded from /etc/lotus-deploy.env (not in git). Auto-deploy: webhook receiver on port 9001, nginx proxies /hooks/lotus-deploy, HMAC-SHA256 verified, triggers on lotus branch push. Deploy script: git reset --hard + npm ci + npm run build + rsync to webroot. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
+13
-1
@@ -1,5 +1,6 @@
|
||||
import { defineConfig } from 'vite';
|
||||
import react from '@vitejs/plugin-react';
|
||||
import { sentryVitePlugin } from '@sentry/vite-plugin';
|
||||
import { wasm } from '@rollup/plugin-wasm';
|
||||
import { viteStaticCopy } from 'vite-plugin-static-copy';
|
||||
import { vanillaExtractPlugin } from '@vanilla-extract/vite-plugin';
|
||||
@@ -94,6 +95,17 @@ export default defineConfig({
|
||||
vanillaExtractPlugin(),
|
||||
wasm(),
|
||||
react(),
|
||||
// Upload source maps to Sentry when auth token is present, then delete maps from dist
|
||||
...(process.env.SENTRY_AUTH_TOKEN ? [sentryVitePlugin({
|
||||
org: 'lotus-guild',
|
||||
project: 'javascript-react',
|
||||
authToken: process.env.SENTRY_AUTH_TOKEN,
|
||||
sourcemaps: {
|
||||
filesToDeleteAfterUpload: ['./dist/**/*.map'],
|
||||
},
|
||||
release: { name: process.env.VITE_APP_VERSION ?? 'lotus' },
|
||||
telemetry: false,
|
||||
})] : []),
|
||||
VitePWA({
|
||||
srcDir: 'src',
|
||||
filename: 'sw.ts',
|
||||
@@ -125,7 +137,7 @@ export default defineConfig({
|
||||
},
|
||||
build: {
|
||||
outDir: 'dist',
|
||||
sourcemap: false,
|
||||
sourcemap: process.env.SENTRY_AUTH_TOKEN ? 'hidden' : false,
|
||||
copyPublicDir: false,
|
||||
rollupOptions: {
|
||||
plugins: [inject({ Buffer: ['buffer', 'Buffer'] })],
|
||||
|
||||
Reference in New Issue
Block a user