Skip to content

Commit 1d93ca4

Browse files
author
David Liu
committed
fix hash discrepancy and iframe centering
1 parent 5dd0780 commit 1d93ca4

File tree

5 files changed

+12
-5
lines changed

5 files changed

+12
-5
lines changed

web/.dockerignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
node_modules
22
dist
3+
.output
4+
.nitro
35
.git
46
.gitignore
57
*.md

web/Dockerfile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@ COPY . .
1515
# Build the application with production mode
1616
ENV NODE_ENV=production
1717
ENV NODE_OPTIONS=--max-old-space-size=4096
18+
# Clean any existing build artifacts to prevent hash mismatches
19+
RUN rm -rf .output .nitro
1820
RUN npm run build
1921

2022
# Production stage

web/src/routes/__root.tsx

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ import { useEffect } from 'react'
1212
import * as gtag from '../helpers/gtags.client'
1313
import { theme } from '../theme'
1414

15-
import appCss from '../styles.css?url'
15+
import '../styles.css'
1616

1717
// You can add these to your .env file
1818
const GA_TRACKING_ID = import.meta.env.VITE_GA_TRACKING_ID
@@ -37,10 +37,6 @@ export const Route = createRootRoute({
3737
},
3838
],
3939
links: [
40-
{
41-
rel: 'stylesheet',
42-
href: appCss,
43-
},
4440
{
4541
rel: 'icon',
4642
href: '/favicon.ico',

web/src/styles.css

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -162,6 +162,9 @@
162162
html body .article iframe {
163163
max-width: 100%;
164164
align-self: center;
165+
margin-left: auto;
166+
margin-right: auto;
167+
display: block;
165168
}
166169

167170
html body .article p + iframe {

web/vite.config.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,10 @@ const config = defineConfig(({ mode }) => ({
1616
mode === 'production' ? nitro() : null,
1717
viteReact(),
1818
].filter(Boolean),
19+
build: {
20+
manifest: true, // Generate manifest.json for asset mapping
21+
ssrManifest: true, // Generate SSR manifest
22+
},
1923
ssr: {
2024
noExternal: ['react-lazy-load-image-component'],
2125
external: ['three', '@react-three/fiber', '@react-three/drei', 'camera-controls'],

0 commit comments

Comments
 (0)